Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Populate a list with previously gathered data

Avatar

Level 4

I would like to populate a dropdown list with data previously gathered within the same form. How do I do this?

1 Accepted Solution

Avatar

Correct answer by
Level 10

There are a variety of ways. For example, if 'stooges' is a drop-down list and 'stoogeName'  is a text field, you could put the following JavaScript on the exit event of 'stoogeName',

// form1.page1.subform1.stoogeName::exit - (JavaScript, client)

form1.page1.subform1.stooges.addItem(this.rawValue);

Steve

View solution in original post

5 Replies

Avatar

Correct answer by
Level 10

There are a variety of ways. For example, if 'stooges' is a drop-down list and 'stoogeName'  is a text field, you could put the following JavaScript on the exit event of 'stoogeName',

// form1.page1.subform1.stoogeName::exit - (JavaScript, client)

form1.page1.subform1.stooges.addItem(this.rawValue);

Steve

Avatar

Level 4

Another related question -

How do I make the data populate in subsequent instances of that dropdown list?

Avatar

Level 10

That depends on the structure of your form and the binding properties for the drop-down. If each page, sub-form, and drop-down is named explicitly you will have to replicate the script for each unique instance of the drop-down. Otherwise, I would have to see the form.

Steve

Avatar

Level 4

I guess they all are uniquely named because they are in different subforms. I can't use fragments because I need unique data values, right?

Here is my form.

You can see the qobj subform repeat.

The qaddobj_btn calls the instance manager.