Accessing/editing variables from now agent mobile app
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2022 11:16 AM
Hello All,
We have a requirement where we need to edit couple of variables before closing the catalog task from now agent mobile app.
Was able to display variables on details screen but was unable to configure variables in edit button (function nor action item).
Any inputs/suggestions are greatly appreciated.
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-11-2024 05:37 AM
In case anyone was wondering, I couldn't find an OOB way to do this, so I tried my earlier post, and it seemed to work for us. Basically, all I did was the following:
- Create a form view on the sc_task table that only contains the Variable Editor formatter
- I called ours Mobile Variables
- Create a workspace and a workspace page
- The workspace and page can be called whatever you want
- For URL parameters, you are going to need sysId and table
- On the workspace page, I added 2 containers
- The first container displays a message saying there are no variables for the ticket and is only displayed when the ticket has no variables associated with it
- The second container contains the Form component and is configured to only show the form view "Mobile Variables" which I created in an earlier step and only shows when there are variables associated with the ticket
- I also included a save button in this container as well and set it to save the form using the Button clicked event which triggers the "[Form action] Save - Data resource" action on the form controller data resource
- All you should have to do to force the form view to be the mobile variables is set the view and forced view name to Mobile_Variables or whatever you called your view in the Form Controller in the data resources section of the UI builder
- Go to the record screen you want to add a variables tab to and add a new record screen segment
- For the embedded screen, you're going to want to create a mobile web screen and set the URL to the workspace page you just created with the sysId and table in the URL set to {{sys_id}} and {{sys_class_name}} respectively
- If you don't have much workspace experience, you can probably use the platform view URL or a portal form view, but the workspace view seems to work better for us
- After all that, you just need to update any actions on the screen that let you close the ticket to verify all required variables have an appropriate value before updating the ticket.
- This requires using the script-type action item instead of any other option
- For us, we use a script include and a decision table to tell which variables are required before closing, so we already had a script set up to do this
The steps above didn't take that much effort/time in total and seemed to work for us with a semi-final output that looked like this:
