How to remove all rows of a variable set

Ansuha Chipuri
Kilo Guru

Hi,

I have a variable set, 

When select choose : New and choose1 : ABCD and added some rows on variable set.

when change choose  : update and choose1: ABCD i want to clear all the rows on the variable set , so that the user want to add new rows, but it was not clearingfind_real_file.png

find_real_file.png

I want to use client script/ui policy  to make it automatically with clicking on remove all button

I tried using ui policy on the catalog item , and added ui policy action for particular variable set and checked the clear value option. it is not clearing the data.

 

Can someone help me?

1 ACCEPTED SOLUTION

SunilKumar_P
Giga Sage

Hi Anusha,

Have you set the "Applies to" to "A catalog item" on your on change client script and UI type to all?

The script mentioned in the attachment is working for me.

Thanks,

View solution in original post

5 REPLIES 5

sachin_namjoshi
Kilo Patron
Kilo Patron

You need an OnChange client script that works when New/Exist is selected & in the script you can access your MRVS by using script like below. So, it will clear the MRVS onChange() of your selection.

function onChange(control, oldValue, newValue, isLoading) {
   if (isLoading || newValue == '') {
      return;
   }
	//alert('yes');

	g_form.clearValue('IO:d6720b481bdc54148009eb186e4bcbe3');//pass sys_id of your MRVS
   
}

 

 

Regards,

Sachin

 

 

its not working. i tried this way and my instance version is newyork

Can you provide your code screenshot?

 

Regards,

Sachin

Below article has solution

 

MVRS - Remove All Rows

 

Regards,

Sachin