Skip to main content

Hi all,

 

In the FSM Client Scripts. The baseline coding logic includes the use of {0} and {1}. May I understand what they mean and how they are to be used?

Eg. the code below:


var fullFilter = stringFormat("task.task_status in (select task_status from task_status where status = 'OP',' and task_status <> '{0}') and task.team_id in (select team_id from team_member where person_id = '{1}') and task.person_id is null", getAppParam("REJECTED_TASK_STATUS"), getUserInfo("PersonID"));
return fullFilter;

 

{0} and {1} are also used in many other context, like in XML Business Rules.

 

Just want to understand how to use these 2 values.
 

Hi @StejonatL,

{0} and {1} are used as the substitution parameters for these queries. If you want to get another argument to substitute for the same query, you can use another 3rd parameter as {2}.

 

{0} - This will take the first argument

{1} - This will take the second argument

 

Lets assume that the values for the below arguments are as follows.

 

getAppParam("REJECTED_TASK_STATUS") - CL

getUserInfo("PersonID") - USER1

 

So the final query will look likes below.

task.task_status in (select task_status from task_status where status = 'OP',' and task_status <> 'CL') and task.team_id in (select team_id from team_member where person_id = 'USER1') and task.person_id is null

 

Hope this information will help you .

 

Thanks,

Hasara


Thank you.


Reply