Custom Lookup to Table: Search box conditions aren't clearing.


Pat - we have seen this issue with “non clearing” search conditions.  It is a known bug.  

Ok. What’s the timeline for a fix?

Ben is working on this and it will be fixed in Banzai. 

Pat there was another post on here somewhere that had this Javascript snippet that you run after/before your popup loads and it will go into your lookup model and clear the behind the scenes search condition.

var reload = false;var model = skuid.$M(“Physicians”);
var conditions = model.conditions;
for (var i = 0; i < conditions.length; i++)
{
var condition = conditions[i];
if (!condition.inactive && condition.originalInactive)
{
model.deactivateCondition(condition);
reload = true;
}
else if (!condition.inactive && !condition.originalInactive)
{
if (condition.field == null && condition.subConditions.length > 0 && condition.name.indexOf("_searchbox") != -1)
{
model.deactivateCondition(condition);
reload = true;
}
}
}
if (reload) model.updateData();

I think this was the post with the workaround.

https://community.skuidify.com/skuid/topics/need-to-reset-model-condition

thats not the same one, but definitely the same thing :slight_smile:

Thanks for digging this up Jarrod. 

Yup. Worked like a charm. Made one tweak as I have 7 lookup fields using this popup table method.

var model = params.model;


And set the Page Title component for each overlayed button to the model in the table.

Is this fixed in Banzai?

bump

I believe this has been fixed in Banzai.  I know Ben did a bunch of work on it…  Do you still see the problem?

Going to install Banzai after dreamforce. I’ll let you know.

Hi Rob, we are currently still dealing with this issue and are having the same problem where it is applying the condition as " " on the results model after you remove the previous value in our search model and press search. Clearing the condition in the snippet, or declaratively through actions, is not working.

Any ideas?