Behaviours Screen Condition

Steven Mustari
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 16, 2020

Is there a way to condition a behavior based on the screen ID? I would like to easily map and organize my behavior rules per screen.

Regards,
Steven

1 answer

1 accepted

1 vote
Answer accepted
Leo
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 16, 2020

Hi @Steven Mustari,

Yes, you can make a condition based on screen name or id

//condition based on name

if(getFieldScreen().name == "Screen Name"){

  //code here

}

//condition based on id

if(getFieldScreen().id == 1234){

  //code here

}

 

BR,

Leo 

Steven Mustari
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 16, 2020

Thanks Leo! Exactly what I needed!

Suggest an answer

Log in or Sign up to answer