Hello,
I been reading and reading but can´t seem to do what I want to do.
I do a lot of forms in Livecycle but can´t seem to understand even the most easy loop.
Lets say I have a table with two columns and ten rows. Textfields in column A is called Cell1 and in column B Cell2.
I want to look through all the rows for this:
If(Cell1.rawValue !== null)
Cell2.fontColor = "255,0,0";
else
Cell2.fontColor = "0,0,0";
If anyone can help me with this I would be very happy. Mayvbe I can start to understand this since it seems like I´m missing out on some very handy functions,.
/ Anders
Sweden
Solved! Go to Solution.
Views
Replies
Total Likes
Assuming all your rows are named 'Row':
for (var a=0;a<Row.all.length;a++){
if (Row.all.item(a).Cell1.rawValue!==null)
Row.all.item(a).Cell2.fontColor = "255,0,0";
else
Row.all.item(a).Cell2.fontColor = "0,0,0";
}
Kyle
Views
Replies
Total Likes
Assuming all your rows are named 'Row':
for (var a=0;a<Row.all.length;a++){
if (Row.all.item(a).Cell1.rawValue!==null)
Row.all.item(a).Cell2.fontColor = "255,0,0";
else
Row.all.item(a).Cell2.fontColor = "0,0,0";
}
Kyle
Views
Replies
Total Likes
Thank you so much
And if I would like to limit the loop I write as follows?
for (var a=0;a<10;a++){
if (Row.item(a).Cell1.rawValue!==null)
Row.item(a).Cell2.fontColor = "255,0,0";
else
Row.item(a).Cell2.fontColor = "0,0,0"; }
Thanks again.
/ Anders
Sweden
Views
Replies
Total Likes
Views
Likes
Replies