Adjusting User Profile Widget to Use a conditional field based on another field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Good morning!
I currently use a cloned copy of the User Profile widget for some other customizations, but right now I am trying to add a field to the widget/user form in the portal that is visible based on a different sys_user field. I want to make the field(s) visible based on the response of a previous field (essentially just cascading fields but one is free text and one includes values).
Since I already have a cloned widget, that step is out of the way - but I cannot figure out where to add my code- assuming it would need to be in the server script? Wasn't sure if anyone else was successful at attempting this 🙂
Thank you so much!
Kristen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Please share screenshots.
If you are trying to show/hide the field in user profile widget based on some field then I doubt this is possible.
The user profile widget simply renders the form view.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thank you for the info! I have been unsuccessful in figuring it out as well and am finding the same thing - it is rending the view form. We have UI policies on the form to hide the field based on the value of the other fields, but I know UI policies wouldn't transfer over to a widget.
I'm fairly certain this won't work, but I did attach some screenshots! You see the 2 duplicate fields listed - one is a free text field and the other is a choice list - they are based on the selections of the fields above.
Thank you! 🙂