Expand my Community achievements bar.

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

On value selected in dropdown, set border and border color to subform

Avatar

Level 2

Ok, I'm busy creating a form which has a dropdown field. There are five values inside the dropdown. I also have four subforms which contain tables and fields for each option in the dropdown except the first one. Now I want to set the border and border colour of the subform when the right value is chosen.

In the exit part I created the code as follows:

if (this.rawValue == "5"){

     this.resolveNode("TextfieldName").presence = "visible"; //This sets a text to visible...works like a charm

     Optie1.ui.oneOfChild.border.color.value = "255,153,0"; //After an example I found from Niall

     Optie1.ui.oneOfChild.border.color.thickness = "0.0200in";

}

I changed this into Optie1, that's the name of the subForm. Somehow it doesn't apply it on the subform. I know I'm doing something wrong, but can't quite find what I want on the forums. Anyone any idea on this?

1 Accepted Solution

Avatar

Correct answer by
Level 2

Okay, managed to solve this myself by playing around a bit with the code.

It should be:

Optie1.border.edge.color.value and Optie1.border.edge.thickness.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 2

Okay, managed to solve this myself by playing around a bit with the code.

It should be:

Optie1.border.edge.color.value and Optie1.border.edge.thickness.