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.
Best answer by david--garcia

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

var language = English;

 

 

 

 

3 replies

alnavarg
alnavargAuthor
March 29, 2023
AkshayAnand
Community Advisor
Community Advisor
March 29, 2023

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

alnavarg
alnavargAuthor
March 29, 2023

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

david--garcia
Level 10
March 29, 2023

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

 

alnavarg
alnavargAuthor
March 29, 2023

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

What we need to write in there?

david--garcia
david--garciaAccepted solution
Level 10
March 29, 2023

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

var language = English;