Expand my Community achievements bar.

SOLVED

Beginner question

Avatar

Level 1

Hey Experts,

I have a dynamic table with 1 row which repeats. I want to change the value of a field in this row so if it is "On" make it show "Enabled".

I have written the following code and I put it in the initialization of the table but it doesn't work.

Can anyone help? What am I doing wrong? Where should the code go?

var rows = FormTradeReceivablesPayablesAccountStatementNotification.bdyPage1.tblOpenItems.tblTable1.resolveNodes(Row1[*]);

var row = rows.item(1);

for (var i = 0; i < rows.length; i++) {

     var row = rows.item(i);

     var dunning = row.DunningOn.rawValue;

     if (dunning == "On")

     {

         row.DunningOn.rawValue = "Enabled";

      }else{

         row.DunningOn.rawValue = "Disabled";

      }

}

Any pointers would be greatly appreciated!

Thanks

Christine

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi there,

If I understand well, you are trying to change the display text of the checkbox field for "Enabled" and "Disabled" according to its value.

The rawValue of a check box is either (On or Off) | (1 or 0).

If you want to change the display text of a check box with a caption(text) attached to it, use the following assignment:

I hope this will help you.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

Hi there,

If I understand well, you are trying to change the display text of the checkbox field for "Enabled" and "Disabled" according to its value.

The rawValue of a check box is either (On or Off) | (1 or 0).

If you want to change the display text of a check box with a caption(text) attached to it, use the following assignment:

I hope this will help you.