Skip to main content

I have the below script to deactivate the conditions,


var params = arguments[0],<br>$ = skuid.$; var ContactSearchModel = skuid.model.getModel('ContactSearch'); $.each(ContactSearchModel.conditions, function(i, condition) { console.log(condition.name); // only deactivate conditions created by table searchbox if (condition.name.indexOf('searchbox') &gt; -1) { ContactSearchModel.deactivateCondition(condition); } } );<br>


I have two users;
1. User A: admin user
2. User B: Skuid Page Viewer

This works fine for user A while the user B is the one who only get this issue.
console.log(condition.name); prints null for user B,

Why is this happening? What am I missing here?

Hi Folks! I found the issue here, silly mistake. I haven’t given the required permission to the field used in the condition , so which caused the null return. Thought this will be useful to someone else someday and posted as the answer.
Cheers!


Hey Hasantha, Like your perseverance.  Skuid on!


Reply