Hi,
I am facing an issue in fn-Replace() in-line function, if I am using more than three variables in build string and I select the check box "Parse token twice" if I will not select this option it will work only with two variables.
below is my in-line function and its result.
--------------------------------------------------------------------------------------------------------------------------------------------
fn-Replace({TextStart}fn-Replace({TextStart}fn-Replace({TextStart}fn-Replace({TextStart}fn-Replace({TextStart}fn-Replace({TextStart}{WorkflowVariable:paramEmailBody}{TextEnd},[varWorkflowPhase],{WorkflowVariable:paramWorkflowPhase}){TextEnd},[varLastTaskRespondentDisplayName],{WorkflowVariable:paramLastTaskRespondentDisplayName}){TextEnd},[varProjectCode],{WorkflowVariable:paramProjectCode}){TextEnd},[varProjectName],{WorkflowVariable:paramProjectName}){TextEnd},[varProjectManagerName],{WorkflowVariable:paramProjectManagerName}){TextEnd},[varApproverComments],{WorkflowVariable:paramApproverComments})
Below is generated string
------------------------------------------------------------------------------------------------------------------------------------------------------
fn-Replace({TextStart}fn-Replace({TextStart}fn-Replace({TextStart}
Dear [varProjectManagerName],
The TestPhase123 has been approved by .
Project Code:
Project Name: [varProjectName]
Project Manager: [varProjectManagerName]
Project Stage: TestPhase123
Comments:
[varApproverComments]
"This is a system generated message - please do not reply."
{TextEnd},[varProjectName],){TextEnd},[varProjectManagerName],test Prog manager name){TextEnd},[varApproverComments],)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Moreover when there is any comma (,) in task comments or any comma in string then again it will not work.
fn-Replace({TextStart}{WorkflowVariable:paramEmailBody}{TextEnd},[varApproverComments],{WorkflowVariable:paramApproverComments})
Solved! Go to Solution.
Kindly ignore below lines in my question, it just for separator.
could you please provide more information on this , why these many replace functions are used ?
Actually, In workflow notification contents will fetch from a SharePoint list.
Please find the below image.
Hi Haseeb Chishti,
Workaround to get rid off Comma is to use TextStart and TextEnd in Build string ,
fn-Replace({TextStart}{WorkflowVariable:paramEmailBody}{TextEnd},[varApproverComments],{TextStart}{WorkflowVariable:paramApproverComments}{TextEnd})
If you see workflow notification content it contains comma , its creating problem while using nested replace function ,
I will suggest you go 1 by 1 ,
1. Generate output for comment as above using Build string store in some variable may be outWithComment
2. Use outWithComment variable to generate other output ,
fn-Replace({TextStart}{WorkflowVariable:outWithComment}{TextEnd},[varProjectName],{TextStart}{WorkflowVariable:paramProjectName}{TextEnd})
...
...
By using this approach you need not to worry about catching special characters ,
Hope this will help.
Thanks Rohan,
Its working.