Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Prevent Identical Selection in Drop Down List in an Expanding Table

$
0
0

Hi All,

 

I have a 2x2 table in which the top row is a header row and the bottom row 'Row1'. Row1 Cell1 has two buttons in it, one to add a new Row1 using Javascript click instance script:

this.parent.parent.instanceManager.addInstance()

 

...and one to remove any Row1 using Javascript click instance script:

var rowNum = this.parent.parent.index;

this.parent.parent.instanceManager.removeInstance(rowNum);

 

Row1 Cell2 contains a datadropdown object.  Basically, when a user adds an extra Row1, I need to prevent them from selecting a previously selected item from the dropdowndata list.  I'm having trouble figuring it out because I'm trying to put together exit instance script (or should it be validate script?) that is trying to reference Row1[*].  In simpler situations where I have two fixed objects, I have just been doing this as a FormCalc exit script:

if (Object1 = Object2)

then xfa.host.messageBox("You can't select the same thing again")

and xfa.host.resetData("Object1")

endif

 

... which prevents the user from selecting something with the same rawvalue by alerting them, then clearing the field. 

 

Hope this makes sense and that someone can help!  Thanks in advance to all the adobe gurus out there


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>