How to Save and Reload UI Page Form Data in Read-Only Mode for Future Visits
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 09:55 PM
Hi Community,
I’m working on a UI Page for a change request form that contains multiple HTML elements such as:
-
TextArea
-
Label
-
Table
-
Checkbox
The use case is as follows:
-
A user fills in the form and submits it.
-
When the same user (or someone else) revisits the UI Page later, the previously submitted values should be automatically loaded and displayed.
-
All form elements should appear in a read-only (non-editable) state on revisit if data already exists for that user.
How can I achieve this functionality ?
Any example or best practice guidance would be really helpful.
Thanks in advance!
-Bishal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 10:17 PM
share the UI page you created.
Remember to store the values already entered in the UI page you will have to store them somewhere in database.
where are you planning to store? in some CHG field which you can always hide in form
You can then check if the values were previous entered then make those HTML elements as readonly
If my response helped please mark it correct ✅ and helpful 👍 & close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 10:34 PM
@Ankur Bawiskar well if i can store them in the same chg record then i dont need to create a custom table. and yes i can hide the fields. so answer is yes i will store them in chg record by creating appropriate fields.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 10:36 PM
yes correct, please store in some hidden field of CHG and no custom table required.
Then you can retrieve and check and then auto populate it again.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2025 10:39 PM
@Ankur Bawiskar ok, but how do we retrieve the value from these different elements.
can you share a sample script for below:
1. Retrieving the value from element
2. Storing it into same CHG record field
3. Making the element non editable if the field has value.