1

I am trying to concatenate two field values together in a formula resource in Salesforce Flow however, despite seeming trivial, I can't get the syntax right to show the correct output. I have tried the following:

{!LoopedAccount.Country__c} & {!LoopedAccount.Name}
{!LoopedAccount.Country__c} + {!LoopedAccount.Name}
{!LoopedAccount.Country__c}{!LoopedAccount.Name}

None of which seem to be valid expressions at runtime with all returning nulls.

When simply adding either of the following:

{!LoopedAccount.Country__c} 
{!LoopedAccount.Name}

..these values show correctly.

Salesforce literature advises the & is the correct concatenation operator. https://help.salesforce.com/articleView?id=flow_considerations_design_formulas.htm&type=5

Flow variable syntax

  • 1
    & is the correct concatenation operator in the flow formula resource, have you tried adding a space between the 2 merged fields like this {!LoopedAccount.Country__c} & ' ' & {!LoopedAccount.Name} ? – Shamina Mar 30 at 18:44
  • Thanks for the reply, just tried with the space, but still no luck! – Andrew Mar 31 at 8:14
0

Best solution I have come up with is to assign the field values to a temporary variable and then in the formula element reference those temporary variables.

Step 1: Assignment Element

{!tempAccountName} = {!LoopedAccount.Name}
{!tempCountry} = {!LoopedAccount.Country__c} 

Step 2: Formula element

{!tempCountry}&' '&{!tempAccountName}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.