-
Notifications
You must be signed in to change notification settings - Fork 583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checked in 2 components #930
base: master
Are you sure you want to change the base?
Conversation
getNextFiveRecords & getAggregateSOQL
GetNext5RecordsFlowAction Add this apex action to a flow & pass the following input variables: counter --> the index to retrieve the next 5 objects from the list totalNumRecs --> how many items are in the list provided; -1 if list is empty AggregateSOQLFlowLightningComponent Add this apex action to a flow & pass the following input variables: query --> the aggregate query to execute against the database List of Strings --> a list of strings that equates to the aggregate query's fieldname values query = "select category__c, count(Id) from assessment_question__c where assessment__c = '0AB234001234567' group by category__c order by category__c" fieldname = "category__c" results of query = {"ABC", 4}, {"BCD", 2}, {"CDE", 3}, {"FGH", 10} List of Strings = { "ABC", "BCD", "CDE", "FGH" } |
@ctalbotSFDC can you expand your writeup a bit and add some example use cases? Can you show any images of these in use or would you be interested in a video that walks through them in use? Not a requirement but I'd like to make it easier for others to put these to use. Also, I'm thinking that GetNext5Records might be a good fit for the CollectionProcessors category. That would imply that we should move it to here https://github.com/alexed1/LightningFlowComponents/tree/master/flow_action_components/CollectionProcessors/force-app/main/default/classes. @adwhite75 would you concur? |
@alexed1 @adwhite75 I'd like to see it as part of the collection processors. Could it be updated first to be GetNextNRecords? |
Because of Flow, the whole point of the action is to get the sequential record from a list as an individual item so you don't have to loop through the entire list to get individual variables. I chose 5 because that was a reasonable number, and so there are 5 output variables. I could up it to 10, but then it'll have 10 output variables. And I could add an input to say how many (up to 10) you want to put into separate variables. I'm ok with moving to the other section (I'm not overly partial to where it goes) :) I'll try to work on something more for the writeup on the getnext5records. Do you have enough for the aggregatesoql one? |
Circling back on this....I think these are both highly useful extensions. I think that I'd like you to call the first one 'GetNextFiveRecordsIndividually' and add it to the collection processors project, and I think that the second one should be called MakeAggregateQuery and added to this project |
getNextFiveRecords & getAggregateSOQL