Hide UI Action based on metric type
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2024 04:37 AM
There is a UI Action button called 'Take assessment' that appears on my form:
I'm wanting to hide it depending on the Metric type. I've written the following condition for my UI Action, but I can't get it to hide:
current.metric_type.active && current.user == gs.getUserID() && (current.state == "ready" || current.state == "wip") && current.metric_type.evaluation_method != "vdr_risk_asmt" && (current.metric_type!= gs.getProperty('AMATechnical') && current.metric_type!= gs.getProperty('AMABusiness') && current.metric_type!= gs.getProperty('AMAScoping'))
If somebody could let me know why my code isn't working and what I need to do to hide the UI Action based on the metric type, that would be much appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2024 04:51 AM
Metric Type is a reference field. I don't know what you have in your system properties, but if you have the sys_id's there, it may help to check on current.metric_type.sys_id!=....
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2024 05:10 AM
I tried that as well, but it the UI Action button on the form still appears, but it prevents the user from completing an assessment based on the assessment type.