Passing a list of ids of selected records to another page

Hi All,


I have a table of records with checkboxes on one page and upon selecting the records from that table I want to take the id of the selected records to another page for another set of operations (filtering data from an aggregrate with these ids). Currently I have tried to store the selected ids in a list and then pass it to another page but it's not working as expected. Can anyone suggest me how I can achieve this ?

Solution

Hi,

You just need to pass a string with all the id's separated by a comma. On the destination screen you just need to use string split and you will have a list of id's like you wanted.

Regards,

Marcelo

Solution

Hi Marcelo,

Thank you for your help. That indeed resolves my issue. But when I am using those id's to filter the aggregrate through a foreach loop in the next page's preparation,it is not displaying all the records in the table. Can you please further assist me how to filter the aggregrate with multiple id's in one go using the foreach loop. 

Hi Suprio Roy,

If you need to filter based on a list of Ids, you will not be able to use a single Aggregate.

You may be able to do it with the SQL tool (by using an IN clause); or use a For Each that uses an Aggregate filtered by Id to fetch the specific record individually (and you will then need to add the record fetched to a List that you can reference on screen)  

Jorge Martins wrote:

Hi Suprio Roy,

If you need to filter based on a list of Ids, you will not be able to use a single Aggregate.

You may be able to do it with the SQL tool (by using an IN clause); or use a For Each that uses an Aggregate filtered by Id to fetch the specific record individually (and you will then need to add the record fetched to a List that you can reference on screen)  


Hi Jorge,

Thanks for your suggestion :-) . I have already implemented that with SQL.

Hi,

Sry I wasn't able to answer you earlier. Glad you were able to find the solution by yourself.

Regards,

Marcelo

Hi Suprio Roy,

Another method that you can use is , by converting the selected 'Id' list into JSON format and de-serializing it into type of list of  'Id' where you want to use it. I have used this in one of my application and worked fine. 

Just a suggesting  :)