Filtering a list view by calculated value


Badge +4

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


2 replies

Badge +10

You can use the option i listview control to filter

189356_pastedImage_0.png

Badge +10

What I have noticed in nintex form is that , when you set values pragmatically it doesn't really trigger the event of change. When there is a rule set on that control, it wont trigger the rule. So we have to call the change event to trigger the even.

Reply