How to add dynamic values to list collector from api response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2022 02:51 AM
Hi all,
We have a requirement where we have to select more than one item (multi select).
Multiselect is only possible through List collector, however the problem is data is dynamically populated through json response.
So the question is how can we dynamically populate data in List collector through api/ json response, is this possible or not?
Do we have any type like list collector to achieve the above workflow?
If soo can some give a working example to demonstrate this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2022 08:42 PM
I don't think it will work in list collector. Because we don't have any table.
I would recommend you to set the network names with comma separated in single line text.
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2022 09:26 PM - edited ‎11-07-2022 09:27 PM
Hi @Aishwarya NG1 ,
You can't use list collector for this as list collector always refers to a table and it understands sys_id only so there is no way you can use it. The only option that you have is to use a string type of field with bigger length like 4000 as shown below:
Using this field you can store data in the format you want:
I hope this help.
Please mark this helpful if this helps and Accept the solution if this solves your issue.
Regards,
Kamlesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2022 09:30 PM
Hi @kamlesh kjmar ,
The objective here is to show the Json response in the list collector and the user will select the required network (multi select). How can we achieve this?
Thanks,
Aishwarya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2022 09:45 PM
You can use this logic. Loop through the array of your objects and for each networkName, GlideRecord to the Network table and look for a record which has same name and create a comma separated list of sys_id of all records and then populate the comma separated sys_id(s) in the list collector.
Regards,
Kamlesh
Regards,
Kamlesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2024 01:18 PM
Hi Aishwarya,
did you able to achieve your requirement? if you were able to achieve , how did you do it?
Thanks,
Venkat