What I need to do is to check for duplicate drop down selections on different rows and warn the user they have selected a value twice.
I currently have this code in the change event of the dropdown which works great but for the first row only - how do I tweak it to work for every instance of the repeatable row 'FullRowSubForm'??
if (xfa.event.newText == form1.WorkforceDepSubForm.WorkforceLineSubform.FullRowSubForm.RepeatableRow.WorkforceRow1.WorkforceNameTextField.rawValue)
xfa.host.messageBox("WARNING you have already selected " + xfa.event.newText + "\n" + "\n" + "Only one instance of dependencies should be selected - please pick another dependency or delete.");
Many thanks for the code - it's almost there. The only issue is that it seems to check for duplicates of the first row's value only. So it works great looking for duplicates of the first row however allows duplicated rows of any other value - as per the image here where 'Workforce B' is repeated:
I have uploaded the section of the form below as I imagine solving referencing issues is tricky without seeing the form layout - any further help much appreciated.