Hi all,
I'm a beginner to LiveCycle and I cant seem to get a loop working within a function. The function is being called successfully because when I manually create the code it works but I am trying to clean things up.
So here is my working example:
function hideContent() {
MainFlowedSub.LevelsSub.Table1.presence = "hidden";
MainFlowedSub.LevelsSub.Table2.presence = "hidden";
... and so on....
MainFlowedSub.LevelsSub.Table8.Row1.presence = "hidden";
MainFlowedSub.LevelsSub.Table8.Row2.presence = "hidden";
... and so on....
}
However when I try and creat a loop instead of listing every sing table/row nothing happens. this is important to my project as there will be alot of different rows depending on radio button selections earlier in the form. Below is the current state of my code:
function hideContent() {
var i=0;
for (i=1;i<=5;i++)
{
MainFlowedSub.LevelsSub.Table[i].presence = "hidden";
}
var j=0;
for (j=1;j<=23;j++)
{
MainFlowedSub.LevelsSub.Table8.Row[j].presence = "hidden";
}
var k=0;
for (k=24;k<=88;k++)
{
MainFlowedSub.LevelsSub.Table8.Row[k].presence = "hidden";
}
;
this will then continue as there will be hundreds of rows.
Any help will be greatly appreciated and I am sure I am making a basic error so thanks in advance.
j