Loading API values into ListBox

Loading API values into ListBox

  

Hi Everyone,


just a really quick question im trying to load my List box with values that i have retrieved from the API call on the fly however the platform seems to have problem identifying the Selection Attribute field.


can someone please guide along? i dont want to persist the data because i should not be holding the data.

Some methods ive tried are: Ive tried to assigned it to a local list as well but still doesn't seem to read. 


thanks,

Best regards,

hitesh


Hi Hitesh,

Please check if PostGetProgGroup.Response list item structure has a boolean attribute. Selection Attribute must a boolean attribute. 

It would be better if you could show the structure of the response.

HI Syed,

below is the attached struct of my PostGetProgGroup.Response list item structure. Nope it does not have any of the items as attributes Boolean.

Group Name: text
Group ID: Long integer
Category ID: Long integer

If i do need the Boolean value i will ask my backend API to add in a attribute isSelectable.


Thanks,

Best regards,

hitesh


Solution

Hi Hitesh,

If you want to maintain the list of selected items just within your application, I suggest creating a local list record variable with PostGetProgGroup.Response list item and a boolean IsSelected variable. Then you can assign the fetched results from api to that local list record and use it. You can set the boolean initially false.

Local list record : 

Fetching and appending results :


Use it in the list box.



Solution

Got it thanks Syed! :) cheers!