These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

fontColor depending on entry

rpeterson
Registered: Oct 7 2008
Posts: 72
Answered

what is wrong with the following script? I cannont seem to get it to work...

----- form1.ScheduleSubform.ScheduleTable.InRow1.MondayIn1::change: - (FormCalc, client) -----------

if(form1.ScheduleSubform.ScheduleTable.InRow1.InMon1=="P") then
(this.fontColor == "0,0,128");darkblue
elseif(form1.ScheduleSubform.ScheduleTable.InRow1.InMon1.rawValue=="R") then
(this.fontColor == "0,0,255");brightblue
elseif(form1.ScheduleSubform.ScheduleTable.InRow1.InMon1.rawValue=="C") then
this.fontColor == "0,128,0";green
elseif(form1.ScheduleSubform.ScheduleTable.InRow1.InMon1.rawValue=="X") then
this.fontColor == "106,53,0";brown
else
this.fontColor == "0,0,0";black
endif

rpeterson

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
The correct syntax is
this.fontColor =
not
this.fontColor ==
or
(this.fontColor == ...)

if(form1.ScheduleSubform.ScheduleTable.InRow1.InMon1=="P") thenthis.fontColor = "0,0,128"elseif(form1.ScheduleSubform.ScheduleTable.InRow1.InMon1.rawValue=="R") thenthis.fontColor = "0,0,255"elseif(form1.ScheduleSubform.ScheduleTable.InRow1.InMon1.rawValue=="C") thenthis.fontColor = "0,128,0"elseif(form1.ScheduleSubform.ScheduleTable.InRow1.InMon1.rawValue=="X") thenthis.fontColor = "106,53,0"elsethis.fontColor = "0,0,0"endif

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

rpeterson
Registered: Oct 7 2008
Posts: 72
Ok, but I have it in the enter event. Should I be placing it with another event instead?

rpeterson

radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
Does it work in the enter event?
If not, use the exit event.

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs