How to hide single variable of one MRVS based on condition of another SinglRow Variable in cat. item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-12-2023 09:39 PM
Hi All,
I Need help on Multi Row Variable Set client side scripting on a catalog item. I have 2 variable set one is single row and another is Multi Row variable set.And the requirement is like based on first single row variable set (variable)selection I need to hide one or two variable of Multi Row Variable set which is containg more than 10 variables .
Example: We have two variable set: first and second
First is Single row which contains one variable named Service which is of select box type having three value : create, modify and delete.
Second variable which is Multirow variable set which contains 10 value : A ,B, C, D, E.....
and the requirement is like Based on first variable selection suppose if we select create option from first variable set(sinle row) then We need to hide A or B value from the second variable set(Multi Row).
Any suggestions how to achieve or reference is highly appreciated.
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2023 05:22 AM
You can do this with an onLoad Catalog Client Script that applies to the MRVS. Note that this will only hide the variable(s) in the add dialog - when the full MRVS is displayed on the request form, RITM, ... it will show all columns regardless of any actions taken to hide certain variables.
function onLoad() {
if (g_service_catalog.parent.getValue('service') == 'create') { //parent variable name and value
g_form.setDisplay('mrvs_a', false); //mrvs variable name
}
}
