- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2024 06:29 AM
Washington DC Patch 5
We have a catalog item with a UI policy where the date variable must be greater than the current date. If the selected date is less than or equal to the current date, the variable is cleared and an error message is displayed. This works well unless the request has been closed. Is there a way to only apply the UI policy to open items so that when we view a request item or catalog task that has been closed the actual selected date is displayed and not flagged as an error? The date variable value for a closed request item or catalog task will most likely be a past date; in this case, we just want to see what it is.
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2024 08:30 AM
I think i figured it out. I added a check to the execute if false onCondition function of the UI Policy - if the request is open/pending/work in progress, then it displays an error message; otherwise, it sets the variables to read only.
I added a similar check to the execute if true onCondition function of the UI Policy which sets the variables to read only if the request is closed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2024 06:33 AM
Hello @mah1 ,
Why don't you try to use g_form,getValue("fieldname")
if(fieldname=="fieldname"){
g_form,setVariableReadonly(true); // or any operation you want.
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2024 07:04 AM
Thank you but I would only want to do that if the request is not active (i.e., not closed). How do I check if the request is active?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2024 08:30 AM
I think i figured it out. I added a check to the execute if false onCondition function of the UI Policy - if the request is open/pending/work in progress, then it displays an error message; otherwise, it sets the variables to read only.
I added a similar check to the execute if true onCondition function of the UI Policy which sets the variables to read only if the request is closed.