hachishti
Novice

Nintex Workflow 2010 - Inline Functions

Jump to solution

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})

Reply
5 Replies
hachishti
Novice

Re: Nintex Workflow 2010 - Inline Functions

Jump to solution

Kindly ignore below lines in my question, it just for separator.

0 Kudos
Reply
rohansm83
Novice

Re: Nintex Workflow 2010 - Inline Functions

Jump to solution

could you please provide more information on this , why these many replace functions are used ?

0 Kudos
Reply
hachishti
Novice

Re: Nintex Workflow 2010 - Inline Functions

Jump to solution

Actually, In workflow notification contents will fetch from a SharePoint list.

Please find the below image.

NintexEmailTemp.JPG

0 Kudos
Reply
rohansm83
Novice

Re: Nintex Workflow 2010 - Inline Functions

Jump to solution

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.

0 Kudos
Reply
hachishti
Novice

Re: Nintex Workflow 2010 - Inline Functions

Jump to solution

Thanks Rohan,

Its working.

0 Kudos
Reply