How to use the Form component
Import
·
May 30, 2022
·
article
Add the Form component to the Page
- Drag and drop the Form component on your page.
Add a "Glide Form" data resource
- Go to Data Resources ( icon database on the left toolbar)
- Click +Add
- Search for "glide form"
- In the section, "@servicenow/now-record-form-connected", select "Glide Form"
- Click Add
Configure the data resource
- Set the following values:
- Table: User (sys_user)
- Sys Id:
- 1. Set the value to "-1" if you want to create a new record
- Set the value dynamically by referencing a page variable
- As an example, we'll set the value to "62826bf03710200044e0bfc8bcbe5df1"
- Set the value dynamically by referencing a page variable
Configure the Form component
- Select your form component
- Go to the component configuration panel and set the following values: (when the value starts with '@', click the dynamic data binding icon first)
- 1. Sections: @data.glide_form_1.nowRecordFormBlob.sections
- Fields: @data.glide_form_1.nowRecordFormBlob.fields
- Table: . Ex: "User (sys_user)"
- SysId : @data.glide_form_1.nowRecordFormBlob.sysId
- Fields: @data.glide_form_1.nowRecordFormBlob.fields
Add a Save button
- Add a button "Save"
- Select the button, go to the Events configuration panel
- Set the click event to Glide Form > Save
And here you have a Form ready to be used.
Labels:
View original source
https://www.servicenow.com/community/developer-articles/how-to-use-the-form-component/ta-p/2297536
