コミュニティアチーブメントバーを展開する。

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

この会話は、活動がないためロックされています。新しい投稿を作成してください。

解決済み

Set the value of a repeatable Dropdown to another Dropdown which is also repeatable.

Avatar

Level 3

Sir,

Actual file link :  https://www.dropbox.com/s/0508by0lmlf77rc/repeatable%20Dropdown%20to%20another%20Dropdown%20which%20...

 

I have a Table of which Row2 is repeatable which contain a Dropdowns with options(1st column) & a Text field (2nd column).

 

Below that i have a Subform in which i have a another Dropdown which is blank with no option initially.

 

Now what I want is  suppose  user adds 4 rows in the table and from dropdown he selects suppose 

1st row -  Example 1 is selected

2nd row - Example 2 is selected 

3rd row - Example 3 is selected  

4th row - Example Other   is select and in the text field column they write "MYNAME"  (if other is selected then user has to fill the text field else text field i.e column 2 is blank)

 

now  in dropdown in the subform (again repeatable) below which is blank initially should be populated with the above options :
so the dropdown should have option as follows:

 Example 1

 Example 2

 Example 3

 Example Other - MYNAME

 

Also, duplicates should be avoided and if the user deletes any row the same value should be deleted from the dropdown as well.

 

Thanks 

@radzmar  @BrianKasingli   @ChitraMadan  @dcidev  

@_Bruce_Robertson

@Srini_Dhulipall 

 

 

1 受け入れられたソリューション

Avatar

正解者
Level 10

This requires just an if-else statement.

var oRows = Table1.resolveNodes('Row2.[Cell1 ne "  -Select-"]');
this.clearItems();
for (var i = 0; i < oRows.length; i += 1) {
	var oNode = oRows.item(i);
	if (oNode.Cell1.rawValue === "  Example Other Member" ) {
		this.addItem(oNode.Cell2.rawValue);
	} else {
		this.addItem(oNode.Cell1.rawValue);
	}
}

元の投稿で解決策を見る

4 返信

Avatar

Level 10

This is quite easy to realize. Add this JavaScript in the enter event of the RB dropdown.

 

var oRows = Table1.resolveNodes('Row2.[Cell1 ne "  -Select-"]');
this.clearItems();
for (var i = 0; i < oRows.length; i += 1) {
	this.addItem(oRows.item(i).Cell1.rawValue);
}

Avatar

Level 3

No, it's not working... i mean its working for only the 1st part .. ie. when you select  options other than OTHER... when we select OTHER option  the dropdown should be populated with the text field value.

Avatar

正解者
Level 10

This requires just an if-else statement.

var oRows = Table1.resolveNodes('Row2.[Cell1 ne "  -Select-"]');
this.clearItems();
for (var i = 0; i < oRows.length; i += 1) {
	var oNode = oRows.item(i);
	if (oNode.Cell1.rawValue === "  Example Other Member" ) {
		this.addItem(oNode.Cell2.rawValue);
	} else {
		this.addItem(oNode.Cell1.rawValue);
	}
}

Avatar

Level 3

Thanks a lot .  It is working ........