cancel
Showing results for 
Search instead for 
Did you mean: 

Hide field of the dynamic line for some conditions

Former Member
0 Kudos

Hello,

I have a dynamic table filled like that :

material | qty | unit | button

123455 | 489 | PC |

987654 | 376 | PC |

765432 | 534 | PC |

On the last column I have a button. When I click on it, I would like to show 2 more fields but only for the line where I clicked the field.

material | qty | unit | button

123455 | 489 | PC |

987654 | 376 | PC |__X__ | here | here |

765432 | 534 | PC |

I think that I can define my table with 6 columns, hide the header of the last 2 ones, but I can't find any instruction to hide and make visible only fields of the line.

Could you help me ?

thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

it's working now.

Former Member
0 Kudos

I wrote this in the click method but I get an error :

var cnt = data.form.TABLE.line.instanceManager.count;
cnt = cnt;  //zero-based index 

for ( var i = 0; i < cnt; i++) {

if ( i == this.parent.index )
{
if ( data.form.TABLE.line.BUTTON == "X" )
{
data.form.TABLE.line(i).new_field = "visible" ; 
}
else{
data.form.TABLE.line(i).new_field = "invisible"
}
}
}

chintan_virani
Active Contributor
0 Kudos

Have a look at this example [here|http://download.macromedia.com/pub/developer/livecycle/scripting_table_columns.zip].

Chintan