In this episode we are explaining how to list data results in a table located on a page. This is the typical use case in which we want to show business data to the user according to certain criteria. For now what we want to demonstrate is how to show results in paginated mode. The good thing here is that we are not writing any line of code at all.
SaaS REST API Structure and Taxonomy
Most of the new REST APIs of Fusion SaaS have the same structure, for example in the HCM package we found:
For now we are focusing in the offset and limit parameters.
An example querying Transfer Orders
Let’s create a page that retrieves all transfer orders. First, we need to locate the service in the catalog. See here for more details.
Create a new project in VB and then drag and drop a table in the page and click Add Data assistant:
Create a couple of global variables at application level adn set the default value for rowspertable as 10:
Select the TransferOrders endpoint and click [Next]:
Select columns to show and the table primary key:
Map the global variables to the endpoint parameters and click [Finish]:
For now we have the results in the table:
Drag and drop an InputNumber on to the Page Structure pane, above the table and set the min value to 0:
Add Assign Variables action to the Action Chain:
Add Navigate action as well:
Click on Assign Variables action and then on Assing link:
Map the value variable in the action chain to the application variable offset and click on [Save]:
Click the Navigate action and then de [Select Target] button:
Select Peer Page:
Select the page where the table is located:
We are almost done, click on the Play button:
Click on the InputNumber up and down and see how the table shows data in pages as the inputnumber changes:
So that’s all for now, in the next episode we’ll see how to filter results in the table.
Hope it helps! 🙂