Single text variable should get display depend on selection of choice list under service catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 11:24 PM
Hi Community,
I need urgent help on: I have requirement that I need to introduce new single text variable under service catalog, this single text variable should be visible only when certain categories (e.g - if I chose one purchase category single text variable should get display there below that particular purchase category ,if I chose 2 another one should be below second purchase category and so on) are chosen from the choice list. Single variable text field Should hard stop because we should be able to enter 10 characters – no more – no less In Alpha numeric sequence.
Thanks,
Manu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 11:40 PM
there are 2 things here
1) visibility of that variable based on another variable i.e. Purchase category
2) validation of input
what did you start with and where are you stuck?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 12:04 AM
Hi Ankur,
As of now I have just created single text variable and Iam not getting the further approach how to handle the requirement. Like I have to use catalog client script to hide and display depend on choice list selection or what.
Thanks,
Manu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 12:09 AM
Hi @Manu143 ,
To restrict the variable for 10 characters , when you configure the variable there is a field named "variable attribute" there you can specify max_length=10
To hide/show the variable , if you have static value of Purchase category you can create a UI Policy to hide and show the variable.
Please mark helpful/correct if my response helped you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 12:11 AM
Hello @Manu143 ,
First create 2 variables which type is single line text and the max length should be 10.
For that follow the below steps :
1.
2.
3.
4.
Now create 2 different UI policies :
1.
2.
For alpha numeric sequence refer bellow link :
Please mark my answer correct or helpful, if applicable.
Thanks & regards,
Chaitali Vale