Skip to main content

Creating a list

ON THIS PAGE

Creating a list

You can create your own callback function for a list.

Do the following:

  1. Select open right panel icon to display the right panel of the Mashup editor.

  2. On the Lists accordion, click Create.

  3. Select Fields radio button and then select the applicable field from the list.

    In this example we use the field Number of Closed Cases.

    You can also create an expression by clicking the Expression button in the Expressions field. This opens the Expression editor.

  4. Select the if you want to define a Frequency mode.

    In this example we want to display the absolute value.

  5. Define your callback name.

    In this example we call it ClosedCases.

    Click Save.

  6. Go to the *.js tab and confirm that the callback has been generated.

    In this example it looks as follows.

    	//create cubes and lists -- inserted here --
    	app.createList({
    		"qFrequencyMode": "V",
    		"qDef": {
    				"qFieldDefs": [
    						"Number of Closed Cases"
    				]
    		},
    		"qExpressions": [],
    		"qInitialDataFetch": [
    				{
    						"qHeight": 20,
    						"qWidth": 1
    				}
    		],
    		"qLibraryId": null
    	},ClosedCases);

    And also confirm that an empty callback function has been generated.

    	//callbacks -- inserted here --
    	function ClosedCases(reply, app){}
  7. Create your callback code in the empty callback function.

You have now created a new list that you can use in your mashup project.

See also