Accessing/editing variables from now agent mobile app

Dharani Krishna
Tera Contributor

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!

19 REPLIES 19

We have the same issue.  We have catalog items that have catalog tasks with variables that need to be updated before the task can be completed.  So the mobile agent is not very useful for our technicians out in the field since they cannot update the variables to close their tasks. 

I had thoughts around a list view of all variables belonging to one particular task- a list view on the sc_item_option_mtom table, so that each variable was a seperate record to click on.  empty ones were present, but I still need to figure a function/action to launch an edit process I think.

It's been a few months, but did Impact or support have any solution for task variables that need to be populated showing up on catalog tasks in the Mobile Agent app?

 

The app is actually useless to us without that functionality.


Please mark this response as correct and/or helpful if it assisted you with your question.
Steven

Tim Preston
Tera Contributor

So, not sure if you're still trying to accomplish variables in the mobile agent. I'm running into this issue as well, but what I'm thinking of doing was something like this.

I would create a workspace and workspace page for the mobile agent in the UI Builder. Then I just add the form component to it and set it up. Then I'll create a custom form view called "variables" or something and only place the variable formatter on that form view and force the form component on the workspace to only show that specific view on that workspace page.

 

Then, in the mobile app builder, add a record screen segment on my record screen with a mobile web screen with the URL for my workspace page. This would basically add the variables for the task on a separate "tab" like the activity stream in the mobile agent. Then I just need to update my button to close the task to check for required variables and send an error message if they aren't all filled out. I already have a decision table set up for some catalog items and some script includes to check that all required variables are set before the task is closed, so that shouldn't be too much of a lift to complete.

 

That seems like the easiest route to me with the least amount of work since the form in the workspace will have all the same UI rules and scripts applied to it that any workspace view would have and also, seems to get around the issue of having to set up inputs on an input form screen since we won't always know which tables/conditions the variables would have, but did anyone find a better solution to this?

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:

 

  1. Create a form view on the sc_task table that only contains the Variable Editor formatter
    1. I called ours Mobile Variables
  2. Create a workspace and a workspace page
    1. The workspace and page can be called whatever you want
    2. For URL parameters, you are going to need sysId and table
  3. On the workspace page, I added 2 containers
    1. 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
    2. 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
      1. 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
      2. 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
  4. Go to the record screen you want to add a variables tab to and add a new record screen segment
    1. 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
    2. 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
  5. 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.
    1. This requires using the script-type action item instead of any other option
    2. 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:

image.png