Skip to main content

Hi all.  Getting the dreaded "The formula expression is invalid: Incorrect number of parameters for function 'SUBSTITUTE()'. Expected 3, received 4  Check Syntax error on a formula.

I am trying to extract the first TWO words of the Account name then add that to the Close Date and the Product Name.  The formula was working fine with using the Account name straight up but I wanted to shorten it.  Help?  Problems with my brackets?

 

TRIM(LEFT({!$Record.Account.Name}, FIND("^",SUBSTITUTE({!$Record.Account.Name}, " ", "^",3)&"^")))&" | "& TEXT({!$Record.CloseDate})&" | "&{!Get_Products.Product2.Name}

 

Thanks!

 

#Flow

11 respostas
  1. 16 de mai. de 2024, 23:58

    Hi ,

     

    Try this

     

    IF(NOT(CONTAINS({!$Record.Account.Name}," ")), {!$Record.Account.Name} ,

    IF(NOT(CONTAINS(RIGHT( {!$Record.Account.Name} ,LEN({!$Record.Account.Name}) - FIND(" ", {!$Record.Account.Name} )) ," ")), {!$Record.Account.Name} ,

    LEFT({!$Record.Account.Name}, FIND(" ",{!$Record.Account.Name})) & " " & LEFT(TRIM(SUBSTITUTE({!$Record.Account.Name}, LEFT({!$Record.Account.Name}, FIND(" ",{!$Record.Account.Name})) ,"")), FIND(" ",TRIM(SUBSTITUTE({!$Record.Account.Name}, LEFT({!$Record.Account.Name}, FIND(" ",{!$Record.Account.Name})) ,""))))

    ))

    & " | " &

    TEXT({!$Record.CloseDate})& " | " & {!Get_Products.Product2.Name}

0/9000