How to check user selected language is English or not through workflow

AnilM99
Tera Expert

Hi Team,

 

Is there any way to check user selected language is English or not

 

my requirement is 

Workflow if condition to check variable value is not English create a catalog task

 

Help me on the same

3 REPLIES 3

Omkar Kumbhar
Mega Sage
Mega Sage

Hello @AnilM99 ,

You can make use gs.getSession().getLanguage() to retrieve the language of the current logged in user.

 

Thanks,

Omkar

If I was able to help you with your case, please click the Thumb Icon and mark as Correct.

@AnilM99 

var lang = gs.getSession().getLanguage();
gs.print('language '+lang);

*** Script: language    en
If I was able to help you with your case, please click the Thumb Icon and mark as Correct.

Basheer
Mega Sage

Hi @AnilM99 ,

You have language field in user table

In workflow write a run script and access the user object using something like this

if(gs.getUser().language == "English"){

return true;

};

else

{

return false;

}

 

 

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.