Need help of clear a list collector variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2023 10:58 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2023 11:05 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2023 11:36 AM
Hello @Erica2
Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful and close the thread.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2023 07:35 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2023 10:26 PM