AnsweredAssumed Answered

Filtering a list view by calculated value

Question asked by mbayoumi on May 23, 2016
Latest reply on Aug 10, 2016 by sojanm

Hi Everyone, I'm trying to filter a list view control by a calculated value. I found a tutorial (which i have subsequently been unable to find since) which advised that to filter list lookups by calculated values you can run some JS to populate the value to a single line text box and then filter on that control's value. I needed to use a list lookup to select a value, which would then be used to filter a further list lookup which would be used to filter a list view.

 

So the formula for the first calculated value is

 

setInitIDHidden(lookup("TblInitiatives","Name",parseLookup(InitiativeName),"_OldID" ))

 

Based on taking the selected value of the InittiativeName control, parsing it, then using it to lookup the _OldID field in the table. Here is the JS to populate that _OldID value to a single line text box.

 

function setInitIDHidden(value)

{

NWF$('#'+InitIDHidden).val(value);

NWF$('#'+InitIDHidden).trigger('change');

}

 

That works fine and it filters the list lookup with no issue. The problem comes when i try to use a similar process to filter a list view control, it sets the form into a recursive loop that stops it from ever loading fully.

 

Long story short, how can I use a calculated value to filter a list view control?

 

Thanks

 

Mish

Outcomes