Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Populate a dropdown based on selected in another dropdown in a seperate table

Avatar

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

Avatar

Correct answer by
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

2 Replies

Avatar

Correct answer by
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.

Avatar

Level 5

Thanks Jono... Worked like a charm.

Have a great weekend

Chomp