New Field on catalog task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2022 06:35 AM
Hi, I want to create a custom field on catalog task and want it to be visible for my particular catalog item (Database Request). If I am submitting any request from database request catalog item then it should create a catalog task with that custom field editable.
I have created field on sc_task table but I want that to be visible only for Database Request catalog item. Can anyone help me with the script???
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2022 06:44 AM
Hello,
You can use a UI Policy with a condition that request item.item = name of item, then use UI Policy Actions related list to set that field to visible = true.
No script needed.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2022 03:57 AM
Hi,
Actually that item field in which catalog gets stored was not visible in ui policy conditions that's why I was unable to put it. From your idea I have captured the short description of catalog tasks as condition. But whenever I am changing the short description in the catalog tasks that field disappear which is valid but when I am putting the old short description back then it is not showing up again. That's the issue.
Thank you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2022 10:50 AM
Hi,
Your question was:
"I have created field on sc_task table but I want that to be visible only for Database Request catalog item."
So you'd use a UI Policy on the sc_task table, with a condition that if the request item.item is 'x', then use the UI Policy actions related list to then set that custom field to visible = true.
Example:
After save:
If you're adding another condition (which you did not tell us in your original post -- so it's always recommended to give as much information as you can), you would add that to the UI Policy that short_description = 'y'.
Ensure that the "revert when false" checkbox on the UI Policy is also checked.
So if you change the short description to something else that is not 'y', then the field would not show, but when you put it back to 'y', it will show.
Without you providing more details, screenshot, etc. I cannot assist any further, but that is how basic UI Policies would work and you should have no problem with this as it's not very complex. Please check your settings as appropriate.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2022 04:33 AM