Expand my Community achievements bar.

SOLVED

Inheriting values on expanding tables

Avatar

Level 3

Hi,

I have a dropdown field (FlatRate) whose rawValue sets/triggers the value & access of another dropdown field (BillStudent) that resides in an expandable row of a table. However, I want any extra instances/rows that are added to the table to inheret the value set by (FlatRate) when adding more rows.

What I have right now is the following where "Admin_Use = Form Name, Table3 = Name of Table, Row1 = Explandable Row, and BillStudent = dropdown field residing in the row.

Under the "exit" Event

if( FlatRate.rawValue == 2){

Admin_Use.Table3.Row1.BillStudent.rawValue = 3;

Admin_Use.Table3.Row1.BillStudent.access = "protected";

}

else {Admin_Use.Table3.Row1.BillStudent.rawValue = null;

Admin_Use.Table3.Row1.BillStudent.access = "open";

}

The code works as I want it to for the first existing row. However, when I add another row, the new row does not carry the same value as the previous one. I want that value to repeat itself for any new instances added to the table.

Thank you very much!!!!

J

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

I think you can achieve what you want by moving your code from the exit event of FlatRate to the calculate event of Row1, so it will look something like;

if (FlatRate.rawValue == "2")

{

    BillStudent.access = "protected";

    BillStudent.rawValue = "3";

}

else

{

    BillStudent.access = "open";

    BillStudent.rawValue = null;

}

Note: The reference to FlatRate might be wrong depending on your form structure.

Good luck

Bruce

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

I think you can achieve what you want by moving your code from the exit event of FlatRate to the calculate event of Row1, so it will look something like;

if (FlatRate.rawValue == "2")

{

    BillStudent.access = "protected";

    BillStudent.rawValue = "3";

}

else

{

    BillStudent.access = "open";

    BillStudent.rawValue = null;

}

Note: The reference to FlatRate might be wrong depending on your form structure.

Good luck

Bruce

Avatar

Level 3

Thank you Bruce!!! Not only I was using the wrong event but also I was placing the code on the wrong field....