Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

How to compare two variable values in if condition ?

varma2
Mega Sage

Hi All,

 

I need to compare two variable value in if condition on workflow.

 

I have reference variable  ( Name_Requested_for ) and string variable ( assigned to) if both variable values not same it need to trigger TASK.

 

Please suggest.

Thanks all.

Varma

1 REPLY 1

Mohith Devatte
Tera Sage
Tera Sage

Hello,

try this 

answer =ifScript();
function ifScript()
{
if(current.variables.Name_Requested_for.getDisplayValue()==current.variables.assigned_to)

{

return 'yes';

}
else
{
return 'no';
}
}

PLEASE MARK MY NASWER CORRECT IF THIS HELPS YOU