Creating a list
You can create your own callback function for a list.
Do the following:
-
Select to display the right panel of the Mashup editor.
-
On the Lists accordion, click Create.
-
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 button in the Expressions field. This opens the Expression editor.
-
Select the if you want to define a Frequency mode.
In this example we want to display the absolute value.
-
Define your callback name.
In this example we call it ClosedCases.
Click Save.
-
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){}
-
Create your callback code in the empty callback function.
You have now created a new list that you can use in your mashup project.