How do i display rest api data in a records table in reactive web?

I was able to display rest api data in a records table in traditional web. However I am unsure of how to display it in reactive web. How do fix the error highlighted?

Hi Jack,

As the error message indicates, you have to add an output parameter to your data action. Then after the REST api call you add an Assign widget and set the Output parameter with the response value from the REST api method. This way the result of the REST api call is available in your screen to use.

Regards,

Daniel

Hi Daniel,

Do you have an example of what you mean? I don't understand as I am new to outsystems.

Regards,

Jack

Hover with your mouse on the Get countries rest method.

Notice in the popup that the rest method has an output parameter. Write down the data type.

On you data action name right click and select Output parameter and set it's the data type to the one you written down.

Now drag from the toolbox on the left the assign widget (=) and drop it on the line between GetCountries and the end widget.

Set the properties of the assign, left part should be the newly created output parameter, right part the output parameter from GetCountries.

Hi Daniel,

Thank you for your guidance. However, I have another question. How do i display that data in a records table now that I am able to obtain that data in that screen?


Regards,

Jack

Hi Jack,

If you click in your screen on the Table widget, and then in the right bottom part of Service Studio look at the properties of the Table widget, then you see a Source property. You can use the output parameter of your Data Action to set the Source for the table widget.

Regards,

Daniel

Hi Daniel,

I was able to create a table with attributes inside. However, there are too many attributes in the table and some of them are being blocked. How do i arrange it so that it can display all 10 attributes?

Regards,

Jack

Hi Lin,

OutSystems has great free training material, it is really helpful in learning the basic concepts of OutSystems application development:

https://www.outsystems.com/learn/courses/

https://www.outsystems.com/learn/courses/127/building-screens-with-data/ 

Regards,

Daniel

Hi Daniel,


They did not show how to display all the attributes without them getting blocked. How do i do that?


Regards,

Jack

Can you share your app?