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

Autopopulate text field based on drop down menu in repeating table


Level 1


First off, apologies if this question has already been asked/answered, but I wasn't able to find a thread that had my specific problem.


I have a table that will dynamically grow when the User presses an "+" button. In my table I have a drop down box that auto populates a text box based on a Users specific selection. This is the code that I used:

form1.page1.subform1.Table1.Rows.ItemDescription::exit - (JavaScript, client)

form1.page1.subform1.Table1.Rows.WarehouseCode.rawValue = form1.page1.subform1.Table1.Rows.ItemDescription.rawValue;

The above code works well however, it only works for the first row and not any subsequent rows that are added when the User selects the "+" button.


What script am I missing that will allow the "WarehouseCode" value to auto populate when a User adds more rows to the table?

Much appreciated! This community has already been so helpful to me especially when I am not a programmer or expert by any means

0 Replies


Level 7


If i am understanding right. You want each row's WarehouseCode to be the same as the one selected in the dropdown on the first row?

If this is the case.

In the intialise event for the WarehouseCode add:

//the code will still execute when the form loads, but nothing is there so it doesnt matter

//each new row will get the value in the ItemDescription dropdown and add it to the WarehouseCode TextField on each new row when the add button is clicked.

//FYI, the [0] in the code represents the first instance (first repeating row of the table). Each time you add a row, the raw value from the first row is used. Each row gets a new instance reference so you can target other rows if needed. Table row 2 is instance [1], row 3 is [2] and so on.

this.resolveNode("$").rawValue = this.resolveNode("form1.page1.subform1.Table1.Rows[0].ItemDescription").rawValue;


Level 1


Thanks so much for replying!

Your understanding is close but let me clarify further for you.

I want each row's WarehouseCode to auto populate based on the Users ItemDescription dropdown selection. So I don't want it to repeat what was selected in Row 1; it will be empty until someone selects an ItemDescription and then based on that selection it will call up the associated WarehouseCode. Right now, the code I am using does that for the first row, but it will not do that for any subsequent rows added.

Is that more clear?

Thanks again for your help! I really appreciate it. Learning lots here.


Level 7

I have experimented with doing as you described. The only difference i see in your initial code is that I put the dropdown event code in change rather than exit.

This is what i did to try it out:




I also specified values for the dropdown list


When i select a dropdownlist item, it returns the value in the textfield. It doesnt matter how many rows are added, each is separate to the other.