Here’s the script:
On the Nintex (Classic) Form I have cascading lookup controls that only populate after a selection is made in the previous control. When a user selects lkup_Dept then lkup_Div populates based on the lkup_Dept selection, and so on down the list. Without input from the previous lookup controls, the lower controls remain blank.
Thanks for your help.
why do you have duplites there?
I'd suggest to think of proper design instead of removing duplicates...
imagine a hierachy scenario:
dptA with ID:1
dptA with ID:2
first isuue - how will you decide which of two dpts with the same name to delete? one with ID:1 or one with ID:2?
second issue - if you eg. delete a dpt with ID:2 you'll then never be able to select divs div3 and div4 since they are related to dptA with ID:2 (and all the subsequent subtree...)
They receive monthly a multi-column position listing that's imported as a sharepoint list. Each lookup control keys off of a column in the provided list. The columns naturally contain duplicates in order to relate each row down to the section level. I considered creating multiple lists off of the original but for ease of management they only want to work with the one unmolested list.
I had consdered the ID issue too, but because I'm keying off of the text of the field, not the ID, the ID isn't relevent. By keying off of the text the cascade produces additional unrelated selections if they exist, rather than losing related selections. I've discussed this with them and they say they aren't concerned as know which ones are valid.
structured parent-child relations would save you from several problems, but as you wish....
well, there is not any event that would be fired and could be captured when subordinated lookup gets populated.
the only possible approch (I'm aware of) is to capture a change event on superordinated lookup, wait for some reasonable delay and apply action (deduplicate) on subordinated lookup
Just a followup...
I got frustrated and didn't have much time to play with this anyway so I wrote a routine that parses the original list and removes duplicates outside of SharePoint and then it imports the four created lists. I then attached the form's lookup fields to the separate lists and it works fine. I'm not fully happy with the solution; I wanted to stay within the confines of the Nintex flow but it seems there's no easy built-in way to stop duplicates from displaying in the dropdowns. I'm also a nube to Nintex so that doesn't help either. Thanks for your input. 🙂
do not take it as a frustration or unhappines. take it as a first learning 🙂
you're heading to a solution I've suggested at the beginning....
there are few more "learnings ahead of you, considering what did you started from