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

  • 2
  • Problem
  • Updated 3 years ago
  • Acknowledged
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb

Posted 3 years ago

  • 2
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Pat - we have seen this issue with "non clearing" search conditions.  It is a known bug.  
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Ok. What's the timeline for a fix?
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Ben is working on this and it will be fixed in Banzai. 
Photo of Jarrod Hinson

Jarrod Hinson

  • 2,310 Points 2k badge 2x thumb
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();
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
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.
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
Photo of Jarrod Hinson

Jarrod Hinson

  • 2,310 Points 2k badge 2x thumb
thats not the same one, but definitely the same thing :)
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Thanks for digging this up Jarrod. 
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Is this fixed in Banzai?
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
bump
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
I believe this has been fixed in Banzai.  I know Ben did a bunch of work on it...  Do you still see the problem?
(Edited)
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Going to install Banzai after dreamforce. I'll let you know.
Photo of Joshua Sangster

Joshua Sangster

  • 232 Points 100 badge 2x thumb
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?