Need help of clear a list collector variable

Erica2
Tera Contributor

Hello,

Could someone please suggest on how to clear/empty a list collector variable after form loaded using catalog client script?   I'm familiar UI Policies, but needed to learn using client script. 

 

Thank you

 

9 REPLIES 9

Samaksh Wani
Giga Sage
Giga Sage

Hello @Erica2 

 

You need to write onLoad() Client Script for this:-

 

 

  function onLoad() {



setTimeout(setMyFilter, 1000);



}


function setMyFilter() {


testg_filter.reset();//Replace"test"   here with the list collector name on catalog item


var answer = '';


answer += 'email!=abel.tuter@example.com'; //sets the default filter as "Active is true"


testg_filter.setQuery(answer);//Replace"test" here with the list collector name on catalog item


testacRequest(null);//Replace"test" here with the list collector name on catalog item


}

 

 

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.

 

Regards,

Samaksh

Hello @Erica2 

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful and close the thread. 

 

Regards,

Samaksh

Hello @Samaksh Wani 

I tried with your suggestion code and I did not get it to work. Can you review the code to see if I missed anything?  Thank you

 

Erica2_0-1692671732771.png

 

Hello @Erica2 

 

Pls give your list collector name in the code.