Hi team , I need to keep changing the values of 3 dropdowns based on previous selection of the other two . So which is better to use, aggregates or assign values to local and perform dynamic assignment to the local list in respect to performance. As far as i know , Use of Local list impacts view state and fetching data from server is slower than from local. So i am confused on which is better approach.
Hi @Sneha Kumari ,
When ever possible try not to query the db, would go to local variables.
In my opinion and experience we should only access the db when we really need.
Hope this helps you, regards.
Hi @Sneha Kumari
I think it really depends on how much data you expect to be in those 3 lists.
When the second and third list will not have so much results, you can keep keep it as local variables (list of structs, not records), and use the List functions to search
When you expect the second and third list come up with 100 or more records, the best solution is to get it directly from the database. When you have created an index on those tables , it would not take that much time.
Best regards, Marlies
The answer will be pros and cons, but I prefer use the List Filter in client side to avoid fetching database frequently
You can decide based on frequency of the data change. For example: data populating in second and third dropdown change consistently(alerted) then you can go for aggregate, where fresh data will get populate in dropdown.
If second and third dropdown data is not changing frequently (may remain same for the period) then use local variable and filter.