Populate drop-downs from table??

Avatar

Avatar
Validate 1
Level 1
chrisb29762052
Level 1

Likes

0 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
chrisb29762052
Level 1

Likes

0 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile
chrisb29762052
Level 1

25-08-2015

I read the discussion on this function and created a sample form to test the code before implementing it in my main form but I can't get it to work.

This is what I put in the "preOpen" of the Drop Down list:

form1.DropTest.DropDownList3::preOpen - (JavaScript, client)

// First clear the items from the list 

this.rawValue = null;  

this.clearItems();  

     

// Build new items 

var nRows = xfa.resolveNodes("form1.DropTest.Table1.Row1[*].Name"); 

     

for (var i=0; i<nRows.length; i++) { 

     this.additem(nRows.item(i).rawValue);  

    }

This is the hierachy of the form

808097_pastedImage_7.png

I am using a table with a repeating row (Row1).This is what the form look like expecting the names to show in the drop down list but it doesnt

808098_pastedImage_10.png.

I would appreciate if somoene could tell me what I am missing. Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,078 posts

Correct reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,078 posts

Correct reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile
Magus069
MVP

25-08-2015

Hi there,

the preOpen event is triggered on the preOpen of the PDF file and not preOpen of the dropDownList.


I think what you want to use in this case would be the enter event of the dropdownlist

Hope this help!

Answers (3)

Answers (3)

Avatar

Avatar
Validate 1
Level 1
chrisb29762052
Level 1

Likes

0 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
chrisb29762052
Level 1

Likes

0 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile
chrisb29762052
Level 1

27-08-2015

It works now. There was a typo error in my code which I would attribute to a glitch with  LC. I am now using the code in a button to update as I wish.

Avatar

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,078 posts

Correct reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile

Avatar
Springboard
MVP
Magus069
MVP

Likes

143 likes

Total Posts

1,078 posts

Correct reply

155 solutions
Top badges earned
Springboard
Validate 1
Ignite 3
Ignite 1
Establish
View profile
Magus069
MVP

25-08-2015

Sure you can send a link to download or I can provide my email

Avatar

Avatar
Validate 1
Level 1
chrisb29762052
Level 1

Likes

0 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
chrisb29762052
Level 1

Likes

0 likes

Total Posts

25 posts

Correct reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile
chrisb29762052
Level 1

25-08-2015

'Thanks but no luck. Still not happening.

I am sending you a copy of the file if you want to look at it.