Condition Helper syntax help

Confluence User - 06 Jun, 2016

Hi!, i will be using condition helper in the process, what will be my syntax? 

the condition is, 

 

if the Worlkflow Variable "desti" has a word "Cebu" in it, regardless if it is "Cebu, Tanao" or "Cebu, Dalisay". 

as long as the word "Cebu" is in. it will go to that process. how will i use that in the condition helper. what will be my syntax when using the "%like' syntax. thanks!

forms;datalists;userviews;user;server

3


06 Jun, 2016
confluenceUser
1
confluenceUser

Hi Jedi

Workflow process conditions are actually JavaScript comparison operators.

For your special case, set 'Use Condition Helper' to 'No' and enter this string into the 'Condition' field in 'Transition Properties':

   /Cebu/gi.test(desti) === true

The '/g' means global match and '/i' means ignore case.

Do some research about JavaScript RegExp and RegExp.prototype.test() functions.

 

07 Jun, 2016
confluenceUser
confluenceUser

Hi Matthew! thank you so much for this! it works! yeah, i am new to joget and javascript. im sorry

07 Jun, 2016
confluenceUser
confluenceUser

No problems Jedi, in IT world, we are all learning. Sorry I should hv reword the last sentence as "You can find out more about JavaScript RegExp and RegExp.prototype.test() functions." :-) Happy Joget Building!

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print