Salesforce Fact #929 | Nth highest in screen flow
We can find the Nth highest value in screen flow using Get Records with a bit of logic.
For example, we want to find the Nth highest NumberOfEmployees value across all the accounts. The idea is to fetch the records and then run a check to iterate over the records as long as the temp variable value is less than N value. The temp variable is initialized to 1. In the assignment we would keep on removing the first record. At the end, we will pick the first record from the collection.
Attached are the screenshots.
Note: this is just a POC flow and the error handlings, best practices are not covered.
Fascinating insight! This highlights just how powerful screen flows can be when used creatively. The ability to find the N-th highest value adds precision to decision-making in complex processes. For businesses looking to simplify or streamline their CRM, it's great to know you can also migrate data from Salesforce to Zoho CRM—making the switch without losing valuable information.
ReplyDelete