Skip to main content

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},tvarWorkflowPhase],{WorkflowVariable:paramWorkflowPhase}){TextEnd},tvarLastTaskRespondentDisplayName],{WorkflowVariable:paramLastTaskRespondentDisplayName}){TextEnd},tvarProjectCode],{WorkflowVariable:paramProjectCode}){TextEnd},tvarProjectName],{WorkflowVariable:paramProjectName}){TextEnd},tvarProjectManagerName],{WorkflowVariable:paramProjectManagerName}){TextEnd},tvarApproverComments],{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},rvarProjectName],){TextEnd},PvarProjectManagerName],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},lvarApproverComments],{WorkflowVariable:paramApproverComments})

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.

NintexEmailTemp.JPG


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},EvarProjectName],{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.


Reply