Save Dropdown value which has populated by a rest api

0
Using microflow call, I have consumed a rest api and microflow will return a list. Using that list I can populate a dropdown but how to save the data of that particular dropdown which I have selected from that dropdown.
asked
1 answers
0

You need to do a few things;

  1. Store the values in a persistable entity
  2. Change the mapping
  3. change moment of call the rest API

 

First change the Non-persistable entity you use for the return of REST call into a persistable entity in the Entity properties.
by doing so, the return of the REST call will then automatically be committed to the database. 

Secondly; change the mapping if needed. A mapping using non-persistable entities will always import and map the return data, as it is always new data. When using a persistable entity, ensure that you at least synchronize your data by change the mapping property to “create when not found” this will do a catch or create when mapping.

Third; you have to rethink the moment when to call the REST API. now you call it as datasource of your dropdown, which I won’t advise to do as it has impact on the user experience. And since you now store the values, you can sync the selectable objects on a more strategic moment.

 

answered