You need to sign in to do that
Don't have an account?
Jugbeer Bhola
SOQL List with different criteria until list is full
The user is asking for data to be displayed based on 4 different criteria types fo the same sObject type. The list should display a maximum of 6 records. If the first 4 records queried match the criteria then collect and show the 4 records of data. Continue to search for more data until the number of 6 records are collected. If only 1 record for the next set of criteria matches then collect that 1 record and add it for a total of 5 records, We still will need 1 more record so another query needs to happen with different criteria until the list is full. How can this be done?
All Answers
Just try and let me know if it works.