workflow

Sue143
Tera Expert

Hi all,

 

I am struggling to fetch in a workflow if script condition the answer to:

current.variables.my_variable == same request already requested and closed complete, requested for the same user.

I couldn't achieve this at all. All my attempts ended up in an error.

Should I create a script include or am I able to get the answer with a GlideRecord script?

 

Feeling a little lost 😕

 

appreciate any advice in the right direction 😄

 

3 REPLIES 3

John Gilmore
Giga Guru

@Sue143 
I don't think we have enough information to understand what you are trying to do in this if condition. We need to know what current.variables.my_variable is and how it related to everything on the right side of your == operator.

If I make some assumptions it would seem to be that you are trying to determine if there is an existing request of the same type, for the same user, that is in a closed state. If that is the case then you could use GlideRecord but would need to return the proper output as true or false.

If you could provide more context on what the if statement is checking for then we can provide a more specific answer.


Neeraj31
Mega Sage

You can use GlideRecord in workflow.

Muhammad Salar
Giga Sage

Hello,
Try logging these and see the results in log
current.variables.my_variable.toString()
current.variables.my_variable.getValue().toString()
current.variables.my_variable.getDisplayValue().toString()

and first try to use current.variables.my_variable.toString() == 
it should work