Input form screen is not displaying updated values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2022 08:53 AM - edited ‎12-06-2022 08:56 AM
Hi,
I've configured a function with an action item and an input form screen to accept user input. I added inputs to this input form screen, and configured variables to auto-fill the inputs with the current values of the record. The input screen opens, displays the current values, but if I change a value, it doesn't reflect the change - it still displays the current value of the record.
Example:
The input form screen contains two inputs, "Short description" and "Assignment group". Pagination is disabled.
 As you can see, the current assignment group is "Göteborg". I can now click on that field, and select a new assignment group:
 
For example, I could select "Seoul" as assignment group. Here's the problem though, if I select anything, it takes me back to the input screen (first screenshot), and doesn't show my changes. The assignment group will still display as Göteborg, even though I've selected something else. Basically, after selecting Seoul, it looks exactly like in my first screenshot, with Göteborg as assignment group.
But: Seoul is selected. If I click on the assignment group field again, I can see "Selected: Seoul" at the top, and if I click on submit, it will actually change the assignment group to Seoul - it just doesn't show this in my input form screen. No matter what I do, the input form screen will always show the value as it is on the current record - Göteborg.
This isn't a problem if pagination is turned on and every field / input has their own page, only if I want to have multiple inputs on one page. It also isn't affecting fields that can be edited inline.
I've seen videos on input form screens, and the presenter doesn't seem to have this issue. Did I forget some sort of configuration that tells the input form screen to display the updated selected value, instead of the current value on the record?
Thanks in advance for your help,
Max
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2022 09:32 AM
Hi - can you share the screenshot of your action item configuration? looks like the set field value condition may be wrong. do you give like similar as given below?
PaulSylo
Kindly mark "helpful", if this helps, or Mark as "Accepted " if it solves your issues !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-06-2022 10:37 AM
Hi PaulSylo,
I'm using the mobile app builder, where it looks like this:
The problem is not writing the change back to the record, but rather displaying the change on the input form screen before hitting submit and writing the change back. The assignment group I select actually gets sucessfully written back to the record, it just doesn't get displayed while still on the input screen.
If I remove the auto fill variable, the input field for assignment group will just stay blank, no matter what I select. Once I hit submit and the input screen closes, I can verify that the group I selected is now the new assignment group of the record.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2023 08:52 AM
Hi there! Did you ever get this figured out?? I'm having a similar issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2023 11:00 AM - edited ‎01-09-2023 11:01 AM
Hi!
After trying for a couple of hours, I worked around this problem by not using an input form screen. The method I used felt very unintuitive to me, but it is how some OOTB edit buttons are done: Data parameters and UI parameters.
TL;DR:
1. Create a function and an action item within that function
2. Open the action item and create data parameters for each field that should be editable
3. Open the function and create UI parameters for each field that should be editable (use exact field label as name)
4. Map all UI parameters to data parameters on the UI parameter "Action data parameter mapping" section
5. Map field values to data parameters on the action item "Field values" section
Long version:
I created a function (called "Edit Case"), and an Action Item inside that function. On the Action Item level, I created Data parameters for each field I wanted the users to be able to edit. I used the type "String" for everything except date fields. The name I gave the Data parameters was pretty irrelevant, so I just used Custom Application Prefix + Field Label.
Afterwards, on the function level, I created UI Parameters. Interestingly, those UI Parameters had to have the exact name of the label of the field, otherwise they wouldn't work. In the Settings section, I always used "Default value type": "Source field" and "Input Source": "User Input". The "Input type" field was usually "Text" or "Choice list" for anything that's picked out of a list (references or actual choice list fields, for example).
In the section "Action data parameter mapping" on the UI Parameter, I selected the corresponding Data parameter, so that the data parameter CustomApp Assignment Group, which I created earlier, was selected in the UI Parameter Assignment Group.
After you've created Data and UI parameters for each field you need, you can do the Field values mapping on the action item, just as you tried with the input screen. You'll be able to select a table field on the left, and a Data parameter on the right.
This is a little confusing as text, maybe it'll help to just look it up on your instance. If you have the Field Service Mobile application installed, you can check out the "Edit"-function in this scope (https://yourinstance.service-now.com/now/mobile-app-builder/editor/sys_sg_button/93b68e44e701230003cd6188d2f6a9c5). If you have Customer Service Mobile installed, there's an "Edit Case" function that works the same way (https://yourinstance.service-now.com/now/mobile-app-builder/editor/sys_sg_button/bdfe6def733223009234c346c4f6a7c8).