Hello,
I'm trying to create a loop inide a loop. In the second loop i want to have the ID of the parent loop. I do not know how to get the proper iteration ID.
I'm currently doing Answer.QuestionId = GetQuestionsByQuizId.List.Current.Question.Id.in my Nested Loop, Which grabs the id of the first entity instead of changing to the next ID every loop. How do I get the next ID?
Hi @Noah Kok,
you are asking about loop but added the image of lists🤔🤔
As per your attached image, you are using List inside parent list, you have added a filter in your child list aggregate Answer.QuestionId = GetQuestionsByQuizId.List.Current.Question.Id but you are not getting correct child records.
create a web block inside this web block take a input parameter QuestionId then now get all data filtered by this input parameter(using aggregate) and show in list in block, also refresh aggregate on Onparameterchange Handler.
Now you can use this web block in your parent list and pass the questionID of parent list source's aggregate.
Explanation: When parent list will load, each time web blok will be initiate and you have passed QuestionID into it it will show records based on parent list QuestionID.
Thanks,
Sanjay Kushwah
Use a block inside and pass parent Id to the Block
hi Noah Kok,
take help from the OML. i am attaching below. for nested list you need to use webblock. so go through of it .
hope this helps
Thanks
Prince
Hi Noah,
Based on Jamal's suggestion to address your issue, you can utilize a block and also refer to the attached link.
https://success.outsystems.com/documentation/11/developing_an_application/design_ui/reuse_ui/pass_data_between_blocks/?_gl=1*sbavut*_ga*ODQ3OTk1MTI2LjE2NzEyNjExMzY.*_ga_ZD4DTMHWR2*MTcwNDAyNjI0Mi44NC4xLjE3MDQwMjY1NTEuNi4wLjA.
Thank you all for your inputs! I read into the examples you all provided about blocks and it resolved my issue!
Great good to hear that