How to bind List of data using OutSystem Mobile?

Hello Folks,


As i using external API in my project.I am Consuming RestApi from Logic Section.It will automatically creating a structure list for me.


So the question is how can we bind list of data in Outsystem mobile while response structure created using Rest API?

Absolutely. The way to do that is to create a local variable of the type that matches your REST response. Then after you call the API , you bind the result to your local variable. On the screen, you bind whatever element to the local variable.


Stacey

Virag Sakhida wrote:

Hello Folks,


As i using external API in my project.I am Consuming RestApi from Logic Section.It will automatically creating a structure list for me.


So the question is how can we bind list of data in Outsystem mobile while response structure created using Rest API?

Hi Virag,

As soon as You Consume a REST-API in Outsystem it creates the Request-Response Structure Automatically.

The only thing you need to make sure is to Consume it properly, You can even Test the same in Wizard to confirm the Output Structure.


So the question is how can we bind list of data in Outsystem mobile while response structure created using Rest API?

What are you trying to do exactly, If you want to Update or Optimize the Request-Response then OutSystems allows you to customize the information sent in responses when exposing a REST API.

For that, do the following:

  1. In the Logic tab, open the Integrations folder;
  2. In the exposed REST API, set the property On Response to New OnResponse;
  3. Open the OnResponse callback action that is now available under the REST API;
  4. Design the logic to customize the information of the response.

Once in use, the OnResponse callback will be executed for all methods exposed by the REST API.


https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/REST/Expose_REST_APIs/Customize_REST_API_Responses


Hope it Helps,

Assif



Hello Stacey Levine ,assif_tiger


Thanks for your response.


Can you please tell step by step with screenshots like how do we able to bind Rest API response data in to list? 

It would be good for me as i am very new to the outsystems mobile.


regards,

Virag Sakhida

Hi Virag,

This forum is meant to aid people with the development of their apps, not to actually show people how to build their apps. If you don't understand the very basics of creating OutSystems apps, I would like to refer you to the training material.

Here is a sample that does what I think you want. You would need to change the REST endpoint to match your server.