Variable Editor

jonathan_77
Mega Expert

Help, please.   I am trying to understand how to use/work with formatters.   A process is already in place (possibly OOB) through our Service Catalog for requesting Access to specific applications.   Once the user submits the access request and their manager approves it, a Task is generated for our Access team to provide them with the necessary permissions.   On the Task generated for access, it contains information in something called a Variable Editor (Formatter).   I've done research and I understand that a formatter is a form element used to display information that is not a field in the record.   I've had to create a process, for a user, that sends two Tasks to different groups when a specific access is requested.   My issue is I cannot figure out how to get the Variable Editor (Formatter) information to show on the additional Task that I have created?? Any thoughts on how to accomplish adding this info?

1 ACCEPTED SOLUTION

HI Jonathan,



Yes, you should be able to set the variables in the business rule in the same way. The task is a GlideRecord object and the source (request item?, you didn't say) is also a GlideRecord. Here's a snippet of how you would do such a thing.



task.variables.variable_name = ritm.variables.variable_name;


View solution in original post

10 REPLIES 10

Chuck Tomasi
Tera Patron

Hi Jonathan,



You can access the variables via script like this:



current.variables.variable_name



Given that, you could create a business rule when the task is created to get at the information on the parent request. These threads might be helpful.



How do I copy all the variables from a requested item to a change request's description?


Display catalog variables on task form


Copying variables from an RITM into a change task?


jonathan_77
Mega Expert

Thank you Chuck, I will look into your suggestion and threads.


jonathan_77
Mega Expert

I may have used incorrect verbiage in my original question.   I evidently have a Variable Set that I am trying to add to a specific Task.   So I am creating two Task, one is created by a workflow and includes the Variable Set on the Task.   Then I created a Business Rule to create the additional Task.   I only need the additional Task to be created if the users selects a specific application.   For all other application request, we just need the one Task that is created by the Workflow and is working correctly.   I guess my question is, can I pull a variable set into a Task using a Business Rule??


HI Jonathan,



Yes, you should be able to set the variables in the business rule in the same way. The task is a GlideRecord object and the source (request item?, you didn't say) is also a GlideRecord. Here's a snippet of how you would do such a thing.



task.variables.variable_name = ritm.variables.variable_name;