UI Builder - Component to create a new record within modal?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2024 12:22 PM
Hi all,
I am trying to display a new record in a modal on UI Builder. I want the user to fill in this form. However, I can not identify which component I should select in order to show a new record for a fixed table? I'd appreciate any help. Thanks.
Screenshot of some of the UI Builder components.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2025 11:54 AM
I have the same challenge, did you manage to clear the form controller to get a new form after saving it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2025 01:15 AM
Hi @Jan Ujcic1 ,
To remove the values of form recorded by previously submitted form.
We have to refresh the page.
1. Replace the data resource from "Form Controller" to use "Glide Form".
2. Map the sysid ( -1 since new record) and "sections", "fields", "related lists" from "Glide Form" data resource to "Form Default" component.
3. All the configurations are same as discussed in the solution of this post.
4. Additional thing we have to do is "Executing Client Script" when form is saved/submitted.
-- > Client script to refresh the page is given below.
5. Add this client script to execute in event handler of "Glide From" controller event
Event name : Form Submit Completed.
So, here whenever the new record is getting submitted it will loads the page. and removes the saved form values from "Form Default" Component
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2025 11:20 AM
Hi SivaniG,
thank you, that does work and that option crossed my mind as well but it is a very disruptive solution and isn't acceptable, refreshing the whole page is what we want to avoid when using the modal window for the creation of a new record.
If I open a different record just after creating the first record the "form controller" seems to have flushed and I can create a new record normally. I still haven't figured how to trigger the same process automatically after saving the original new record.
Kind regards,
Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2025 11:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2025 03:17 AM
Hi SiavaniG,
thanks for the efforts, I did manage to achieve my requirement by basically resetting the client variable to an already existing record and then with a slight delay back to "-1". This mimicked the selection of a record from the list that did reset the controller by default. It turns out that using Glide Form was important in this regard since this trick didn't work with the Form Controller, so thanks! I am would need to dive deeper to understand why this trick works but I'd be happy to learn if someone has an idea.
This is the client script that is called on the "Modal closed" event mapping:
let existingRecordId = api.data.look_up_existing_record.results[0]["_row_data"]["uniqueValue"] //id of a record fetched by a separate "Look up record" data resource (existing record)
api.setState("selectedRecordId", existingRecordId ); // client state parameter used in Glide Form, defines the form in the modal
helpers.timing.setTimeout(function(){
console.log("After");
api.setState("selectedRecordId", "-1");
}, 300);