- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2025 10:24 AM - edited ‎01-29-2025 02:25 AM
Hi Community...
I got a requirement that, based on the inside variable value in MRVS, i need to hide the entire container,
For example, Iam having A,B,C,D variables in the MRVS container. Based on the input variable value we need to display the data in B,C and D. (here "A" is reference variable, BCD are text variables)
suppose if the value of A='empty or 'null', no need to display the other variables and also the MTVS container need to hide on the form. (entire container need to hide).
If "E" is external variable (outside the container) means, based on that we can hide the MRVS container, But this variable "A" is inside the MRVS container.
I have tried with the catalog UI polocy and catalog client script, but no luck.
Please help any one, how can i achive/implement this fucntionality please suggest.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2025 07:17 AM
@Ankur Bawiskar Hi ANkur, I have seen your other thread reply in the community regarding the same scenario.
https://www.servicenow.com/community/developer-forum/hide-variable-column-from-multi-row-variable-on...
DOM manipulation suggested by you. Is it good to implement this or not ?
Please let me know
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2025 12:32 PM
Are you saying that you have a MRVS called "something", inside of this you have 4 variables called "A", "B", "C", and "D". The user selects a record in "A" called "null", you want the entire MRVS("something") to then be visible = false? Meaning A, B, C, D are all hidden?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2025 01:06 AM
@booher04 Hi
Yes.
It is an automated functionality. we will create request/ritm through API call. The RITM will contain MRVS container to populate the data.
Whenever we are retrieves the "A" value in the MRVS, other BCD values will populate in the MRVS based on the "A" value. For this we are using before insert business rule to populate BCD values.
Suppose, if we not get any value for "A" means, the MRVS shows empty on the request.
Instead of showing empty MRVS container, customer wants to hide the entire MRVS container whenever we will not receive "A" value. (this "A" B,C,D all four variables are inside the container only)
How to hide the MRVS container if its having empty/null data inside it.
Please suggest anyone, how can i go forward to achieve this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2025 01:22 AM
so you are populating the rows in MRVS based on some script when API call is made to ServiceNow?
If yes then during populating/create rows via script check if variable A has value, if yes then only add that row
This ensures whenever MRVS is opened on RITM it has rows where variable A has value in it
Please share some screenshots as well and script which you are using.
Your question seems confusing. You are saying A is external variable but you are also saying A,B,C,D are variables within the MRVS?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2025 02:54 AM - edited ‎01-29-2025 02:56 AM
@Ankur Bawiskar Hi Ankur,
Yes, we are populating the rows in MRVS, when API call is made to ServiceNow.
We are using Before insert business rule on RITM table and updating the MRVS with the below script.
The below screenshot will provide you in detail. MRVS name: Previous RITM's.
we are having total 4 columns as below(RITM Number, Status, Due date, Approval status)
whenever we will receive the 1st column value(RITM number), based on that remaining values will populate related to that RITM in next fields using above business rule.
If we are not getting the RITM value, the container should be like below
But, Our customer requirement is, when we are not getting any RITM's in the MRVS, we need to hide the entire container(no need to display the MRVS if it is empty).
I have written catalog client script Onload on catalog form like below, It is hiding the MRVS container completely on the form, but not checking the RITM null value condition(hiding for both empty/non empty ritm values).
Please suggest where iam missing and how can i achieve this hiding entire MRVS container if we get only null values.