Pass dropdown value to form in Workspace

NeetaC
Tera Contributor

 

I am working on a ServiceNow Workspace and need guidance on passing values from a dropdown to a form.

Requirement:

  • I have created a custom table application that stores application details.

  • In Workspace, I added a Dropdown component that displays the list of applications from application.

  • I also created a button in the Workspace.

Expected behaviour:

  1. User selects an application from the dropdown.

  2. User clicks the button.

  3. A Vault Onboarding Request form custom form should open.

  4. The form fields should be auto-populated based on the selected application (for example: application 

    1. name, owner, environment, etc.).

    2. User reviews the data and submits the request.

    What I need help with:

    • How to open a Vault Onboarding request Form from Workspace on button click

    • How to pass the selected dropdown value to the form

    • How to auto-populate the fields in the form using that selected application data

    • Whether this should be handled using UI Actions, Workspace Action Handlers, Client Scripts, Data Resources, or URL parameters

    If anyone has implemented a similar use case in Workspace, sample steps or best practices would be greatly appreciated.

 
2 REPLIES 2

AnkaRaoB
Giga Guru

Hi @NeetaC ,

 

In Workspace, forms should be opened using navigation actions (Open URL), and values should be passed via URL parameters. The selected dropdown value (application sys_id) can be sent to the new record form using sysparm_query. Field auto-population should be handled server-side using a Before Insert Business Rule on the target table. UI Actions and Client Scripts are not supported in Workspace and should be avoided.

 

If this response helps you solve the issue, please mark it as the Accepted Solution.

 

Thanks,

AnkaRao

NeetaC
Tera Contributor

Could you please provide in detail solution