Can i show template inside a variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
Hello All,
I want to have a template where i will have some patient details.
like name ,age,gender like these will be questions.
and these questions even i can store in a table as well i have a custom table even i can reuse that if we need.
My requirement is when i select option insurance type as health for example i have a variable called patient details these template questions should be applied and user should be able to select also and fill it .
Can i achieve this somehow either by using multiline variable set or using templates or something.
@Ankur Bawiskar any suggestions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
yes MRVS is an option
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hello @Ankur Bawiskar ,
How i can limit only one entry after that disable the add button in the mrvs?
I checked the below link and tried one solution its not working
https://www.servicenow.com/community/developer-articles/disable-buttons-in-multirow-variable-set/ta-...
i tried the below script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
in the MRVS variable attribute add this max_rows=1
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
Hi @Debasis Pati !!
Yes, this requirement can be achieved in ServiceNow, but with an important design consideration.
ServiceNow does not support dynamically creating catalog variables at runtime from a table. Catalog questions must exist at design time. However, you can still meet your requirement using Variable Sets or Multi-Row Variable Sets (MRVS) with conditional visibility.
Recommended Approach
Create a Variable Set (template)
Create a Variable Set called Patient Details
Add questions like Name, Age, Gender, DOB, etc.
This acts as your reusable template
Add Insurance Type variable
Create a choice variable insurance_type (Health, Life, Vehicle, etc.)
Attach the Variable Set to the Catalog Item
Add the Patient Details Variable Set to the item
Keep it hidden by default
Use a Catalog UI Policy
Condition: insurance_type = Health
Action: Show the Patient Details Variable Set
Else: Hide it
When the user selects Insurance Type = Health, the patient detail questions are displayed and can be filled in.
If Multiple Patients Are Required
If one request can include multiple patients, use a Multi-Row Variable Set (MRVS) instead of a normal Variable Set. Each row represents one patient.
Storing Data in a Custom Table
You can store the submitted patient details into your custom table using:
Flow Designer (recommended), or
A Business Rule on the request
Mark this as Helpful if it clarifies the issue.
Accept the solution if this answers your question.
Regards,
Vaishnavi
Associate Technical Consultant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago - last edited 6 hours ago
I don’t think we can call a template from a variable. You need to use the variable only to get the data in MRVS form.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/dratulgrover [ Connect for 1-1 Session]
****************************************************************************************************************
