Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Getting the requested_for value

ceraulo
Mega Guru

Hello!

I have a catalog item workflow that needs to populate the short_description field. The script is:

task.short_description =  "This is a request for " + current.request.requested_for.toString();

However this is not working. The fields (ex. Requested_for) is populated from an integration with another application.
The requested_for field is populated correctly but I am unable to extract and use it in the task's short description.

Please help!

Thank you.

1 ACCEPTED SOLUTION

Also note that the workflow timings of the request/request item generation are kind of strange.  If you're doing this right at the very beginning of your workflow, try putting in a 5 second timer right before to allow enough wait time for the request and item to be created and linked fully before this step.

View solution in original post

5 REPLIES 5

Mark Stanger
Giga Sage

'current.request.requested_for.getDisplayValue()' should work.

Also note that the workflow timings of the request/request item generation are kind of strange.  If you're doing this right at the very beginning of your workflow, try putting in a 5 second timer right before to allow enough wait time for the request and item to be created and linked fully before this step.

Mark,

 

So how would I get this to pull from the Variables requested for and not the Requested for of the RITM?

find_real_file.png

find_real_file.png

Just access the 'variables' object like any other field, followed by the name of your variable...

current.request_item.variables.<yourvarnamehere>.getDisplayValue();