UIB | Button Clicked - setValue to field

Spaceballs
Kilo Sage

Hi,

I'm wondering if is possible when I clicked the button on the workspace and have the Category field in the form set to string "ABC"? 

 

Here is the configuration

 

Spaceballs_1-1676061658992.png

Spaceballs_2-1676061747245.png

Spaceballs_3-1676061774694.png

 

The link will navigate to the form

Spaceballs_4-1676061908332.png

 

6 REPLIES 6

Looking at your Glide Form 1, you have sys_id -1. -1 means new record. Instead, you should be using props to set your table and sysID fields. For sure sysID, you can hard code the table if you want.

Screenshot 2023-02-13 at 8.52.50 AM.png

mackinley
Tera Expert

The platform view supports prefilling form fields in new records in the URL. Here is an example of a URL for a new Appointment [itil_appointment] record with the Subject [subject] field set to "ABC" on load:

 

`https://instance.service-now.com/itil_appointment.do?sys_id=-1&sysparm_query=subject%3dABC`

 

you could use

 

`https://instance.service-now.com/x_964096_my_test_1_control_master.do?sys-id=-1&sysparm_query=catego...`

 

To get more examples, you can go to a records list view on the platform and set 1 or more filters to <field> IS <value>. After applying the filter, press the `New` button and you'll see that the fields get prefilled and the URL has the parameters it needs to do so.

 

mackinley_0-1709669776447.pngmackinley_1-1709669939942.png

 

 

I question why you are sending the user from a Workspace to the platform view though. It would be a better experience to keep them in the workspace and there are definitely documented ways of doing so.