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 dropdown based on selected in another dropdown in a seperate table

donn44157260
Level 5
Level 5

Good Day All;

This may sound like a simple question to most, but… It has had me frustrated trying to figure out.

I am trying to populate a dropdown based on what is selected in another dropdown.

Let me explain what I have done so far.

LifeCycle Designer 8.05.2

When I had both dropdowns in the same table, I did not have a problem. The code I used is

Table name is “Table1”

if(directorate.rawValue == "1")

{

division.clearItems();

division.addItem("select")

}

I was asked to move things around and now “division” is located in “Table2”

I know I need to reference “Table1” but I am running into a Syntax error. I have tried the following code;

if(Table1 Row1 directorate.rawValue == "1")

{

division.clearItems();

division.addItem("Faire un choix")

}

if(Table1.Row1.directorate.rawValue == "1")

{

division.clearItems();

division.addItem("Faire un choix")

}

Any help would be appreciated

Chomp

1 Accepted Solution
Jono_Moore
Correct answer by
Level 10
Level 10

You're missing a semicolon at the end of the addItem line, and on the second code sample you've got no periods in the SOM reference (Table1 Row1 directorate). 

The easiest way to get the path to another field is to ctrl-click on the field while you are in the script editor.

View solution in original post

0 Replies
Jono_Moore
Correct answer by
Level 10
Level 10

You're missing a semicolon at the end of the addItem line, and on the second code sample you've got no periods in the SOM reference (Table1 Row1 directorate). 

The easiest way to get the path to another field is to ctrl-click on the field while you are in the script editor.

View solution in original post

donn44157260
Level 5
Level 5

Thanks Jono... Worked like a charm.

Have a great weekend

Chomp