Good day!
So I am having trouble using lookup function for the calculated value so I decided to try and select all the items in my listlookup with this code:
NWF.FormFiller.Events.RegisterAfterReady(function ()
{
let row = NWF$(this).closest('.nf-repeater-row');
row.find('.listLookUpCSS option:selected').prop('selected', true);
});
Doesn't seem to work unless it is going to be a button click. Or can anyone explain how to get the length of a list lookup?
Solved! Go to Solution.
Hi Karl Christopher Cristobal,
If you need to know the number of selected checkboxes, you can use a calculated value control with the length(myMultiSelectField) function. In stead of the string length it returns the number of checked boxes. At least on my Nintex 2013 on-prem test form. This also works on the lookup() function (don't forget to specify the last Boolean as true in order to allow multiple items).
this is not going to work. lookups are populated asynchronously after ready/RegisterAfterReady events.
can you clarify what exactly you'd like to calculate and what's the exact problem with lookup() funtion?
I have a list lookup. I am trying to calculate how many are populated items in it without selecting it, just the number of the populated item. (I need it for verification actually)
length(lookup('Unix Linux Patching Follow Up', 'TSM in String', tsmInString, 'Hostname/Local Zone', true))
Here is my calculated value formula.
So from what I understand.
First is the list name
Second is the name of the column
Third is the value
Fourth is the output column (filtered items depending on second and third, right?)
Fifth is true?
Now, I think this only works on selected items, not the whole populated items per se. I just want to calculate the number of items inside the list lookup for validation purposes.
Nevermind, it seems I inputted the wrong value for the lookup. Pretty sure I tried all methods yesterday. Anyway, thanks for the response.