20
Views
5
Comments
Merge two list one is having answers with qid and another list is having Qid and desc
Question
Application Type
Reactive

Hello, 

I have two different List. 

one is original list with Qid, Qsubid and description of that question.Please find below screenshot .


i am displaying this list on web page . and then user will fill the answers like yes/No or comment or he will select list or table with elements and if sub id is presenet he will select respective answers for that. now next screen shot is response list which i am getting .Please find the screenshot.



 but here i am getting only answers with Qid /Qid_sub , i want this list to be bind with original list like S01 it should be i.e for 0 index it should be like Result ="Y" and Et_Results2 should be with original data like form first screenshot. 

May i know how can i bind this answers with my original list . 

Your help will be appreciable. thanks 

2019-11-11 17-10-24
Manish Jawla
 
MVP

Hi @Bharat koshti ,

You can merge the two lists by looping through the original questions list and, for each question, using ListFilter to find the matching record in the answers list based on Qid (and Qid_Sub if needed).

If a match exists, take the answer value, otherwise leave it blank. Then create a new record combining the question data and the answer, and append it to a new merged list.

Finally, bind this merged list to the UI.

https://www.outsystems.com/forums/discussion/100320/check-for-changes-from-one-list-to-another-list/ 

Regards,

Manish Jawla


2023-02-28 05-45-34
Bharat koshti






from secnd iteration Et_results_BDSP2.Current.Et_Results2.Qid is only C05 getting .. can i get some sample example to understand 

2026-01-28 16-57-48
Mihai Melencu
Champion

Hi Bharat,

Could you please explain your actual structure in more detail?

I understand that QId represents the question identifier, but what exactly is SubId? Do you have question sections with sub-questions under each main question?

Also, how does your database model look?

  • Are the questions linked to a specific entity (for example, a Project, Form, Survey, etc)?

  • Are they stored directly per user?

  • How are the answers persisted?

If possible, sharing a small sample OML with your real structure would be very helpful to better understand your setup and provide a more accurate solution.

2023-12-28 17-18-31
Praveen Kumar Natarajan
 
MVP

Hi Bharat, 

this is coz , in your above screenshot the iteration is done only on BDSP and not on BDSP2.
possible solution:  


in this screenshot , you can assign the 
1. list section of  list filter to BDSP2 
2. Filter section to Qid = ET_Results_bdsp.current.ER_Result2.Qid

I presume this should filter the results submited by the user for the exact Qid.. and should help to map their answers to your original list 

if its possible pls share oml of this function. could help to identify the issue!

Regards ,

Praveen

2025-12-03 17-22-41
Lavanya Kamalaguru

Hi @Bharat koshti ,

Use For each loop in original List. Inside the Loop, find the matching record in the response list Qid and Qid_Sub.

Response.Qid = Original.Qid and Response.Qid_Sub=Original.Qid_Sub.

If match is found, update the original result Original.Result = Response.Result.

You can also update other fields such as comments, dropdown values, or table data in the same way.

If possible could you please share a sample OML file?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.