I need to figure out the right calculation script to run a workflow that essentially looks for certain placeholders within a multi line text field ‘template’ and then replaces those with the defined variables from my current item in Tape.
For an example, I used to use a PHP variable as follows in Globiflow:
str_replace("[Company Phone]",[(Variable) senderPhone],
str_replace("[Lead Manager Name]",[(Variable) LMFName],
str_replace("[Address - Street Only]",[(Variable) streetaddress],
str_replace("[Full Address]",[(Variable) fulladdress],
str_replace("[Acquisition Manager Name]",[(Variable) AMFName],
str_replace("[Phone Number]",[(Variable) txtPhone],
strip_tags_gf([(Ref Message Template) Text Message Body])))))))
I tried various approaches from some google searching to accomplish this in Javascript but I have not found a good working answer yet.
I know this will be a simple answer for somebody, but my limited javascript skills have failed me here. Thanks in advance for any guidance here.