Hide field in SP widget if dependent field is empty
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 06:53 AM
I have two fields on a SP widget, "Project" and "Service".
I would like the service field to only be visible if the project field is not empty.
Two fields:
HTML that I am using:
<br><label for="project">Project</label><br>
<sn-record-picker field="project" table="'pm_project'" display-field="'short_description'" display-fields="'status,project_manager'" value-field="'sys_id'" search-fields="'short_description'" page-size="100" ></sn-record-picker>
<br><label for="service">Service</label><br>
<sn-record-picker field="service" table="'cmdb_ci_service'" display-field="'name'" display-fields="'owned_by,service_classification'" value-field="'sys_id'" search-fields="'name'" page-size="100"></sn-record-picker>
I do not have any client or server scripts for this widget yet.
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 07:41 AM
Hi @JJG_SNOW ,
You would need to create a catalog ui policy on the project variable.
The create a catalog policy UI action
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 07:44 AM
This is a Service Portal widget, not a catalog item / record producer.