Expand my Community achievements bar.

Fill header and cell table based on ComboBox selection

Avatar

Level 5

Hi All.

In my form I have ComboBox and Table1:

Header1Header2
Content1Content2
Content12Content22

And I would like if ComboBox selected value = AAA so in Table1 Header1 and Content1 will change value to AAA_Header and AAA_Content.

If ComboBox selected value = BBB so in Table1 Header1 and Content1 will change value to BBB_Header and BBB_Content.

If is it possible how it to do? I will appreciate for sample.

Thanks.

2 Replies

Avatar

Level 10

Hi,

You can achieve this, but both objects (Header1 and Content1 will need to be textfield objects and not text objects. If you don't want the user to be able to change these values, then you can set the textfield objects to Read Only, in the Object > Value palette.

The script in the exit event of the dropdown list would look like:

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

     Header1.rawValue = "AAA_Header";

     Content1.rawValue = "AAA_Content";

}

else if (this.rawValue == "BBB") {

     Header1.rawValue = "BBB_Header";

     Content1.rawValue = "BBB_Content";

}

The object references will have to match your form.

Niall

Avatar

Level 5

Hi Niall. Your post is very helpful.  Thanks a lot.