One reader of yesterday’s email mentioned there’s a flow function called INITCAP(text) which formats words in Sentence Case.
A second reader mentioned you may need to handle exceptions like MacPerson, McDonald, or O’Neal.
Thanks to both of you for this feedback.
Another interesting trick in flow can be found in the assignment step. Imagine you want to create a collection record variable from several single record variables. Normally this would be performed in a loop.
The 1st assignment step in the loop is to assign the fields of the single record variable, say “Account”. For example, Account.Name and Account.Type are set in the 1st step.
The 2nd assignment step is to add Account to Accounts, which is a collection record variable. And then the loop repeats. Once the loop completes, you perform the DML operation on Accounts.
However, did you know you can merge the 1st and 2nd step into a single step? As long as you add the Account to Accounts as the last row in the assignment step, you’re good.
And if you need to set another field in Account, be sure to keep the Account to Accounts as the new last row.
The takeaway
In a flow, the row order in the assignment step matters.