34
Views
2
Comments
Dynamic form

Hello good morning, I have this issue that I have a lot of server call on my dynamic form, my current implementation is I have a block that will going to display a list of questions and then another block to display a list of choices on my radio button, checkbox and dropdown. What happening here is every time at I will call my list f question it will also call the list of choices and that will call a lot server action. My I know if there are ways that I can do to lessen the server call?



Screenshot 2025-02-20 061911.png
Screenshot 2025-02-20 061933.png
2026-02-16 05-51-10
Sahana K

Hi,
1.Instead of calling GetListChoicesByQuestionId for each question, modify your server action to retrieve all choices in a single query based on the list of question IDs. 
2.Modify your existing fetch logic to return both questions and their choices in one query by performing a join in an aggregate or SQL query. 


Thanks,
Sahana

2022-12-30 07-28-09
Navneet Garg

You need to call list of question and option list in the parent and then pass it to the child block.

If you call it in child block every thing block loads it will call the service action.


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