Javascript | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
david--garcia
david--garciaAccepted solution
Level 10
Mar 29, 2023 11:14 AM UTC

Should be pretty straight forward, perhaps in the example I provided I forgot to enclose the value in quotes.

var language = English;

 

 

 

 

7 replies

david--garcia
Level 10
Mar 29, 2023 9:35 AM UTC

I believe this may be what you are after, using advanced javascript, you can create multiple transitions and activate whichever one meets the condition.

 

var language = English;

if(language == "English"){
  task.postEvent(task.transitionByName('english')); 
} else {
  task.postEvent(task.transitionByName('other'));
}

 

Translate
alnavarg
alnavargAuthor
Level 4
Mar 29, 2023 9:49 AM UTC

We have problems with the postEvent, in the log puts invalid argument 

What we need to write in there?

Translate
david--garcia
david--garciaAccepted solution
Level 10
Mar 29, 2023 11:14 AM UTC

Should be pretty straight forward, perhaps in the example I provided I forgot to enclose the value in quotes.

var language = English;

 

 

 

 

Translate
AkshayAnand
New Participant
Mar 29, 2023 8:59 AM UTC

Hi @alnavarg 

 

Could you please explain a bit more here.

As you can use conditional statements for fetching the desired records based on your filtering criterias.

 

Regards

A

Translate
alnavarg
alnavargAuthor
Level 4
Mar 29, 2023 9:03 AM UTC

i like to know how can i do a split in js code to do a selection from deliveries depends on the laguage of the recipient

Translate
alnavarg
alnavargAuthor
Level 4
Mar 29, 2023 8:25 AM UTC

@linda_stinson 

Translate