This topic is locked

Conditional Formatting on String Value

1/22/2014 3:54:57 PM
ASPRunnerPro General questions
F
fenhow author

Hi I am trying to change the background of the cell based on a text value in that cell.

Currently have on the List page: After record processed event
if data("SURFACE PERMIT STATUS")="PERMIT W/STIPS" then

record("SURFACE PERMIT STATUS_style") = record("SURFACE PERMIT STATUS_style") & "style='background:yellow'"

end if
But it does not work.
Can you tell me how to accomplish this?

Thanks

mperry622 1/22/2014



Hi I am trying to change the background of the cell based on a text value in that cell.

Currently have on the List page: After record processed event
if data("SURFACE PERMIT STATUS")="PERMIT W/STIPS" then

record("SURFACE PERMIT STATUS_style") = record("SURFACE PERMIT STATUS_style") & "style='background:yellow'"

end if
But it does not work.
Can you tell me how to accomplish this?

Thanks



I use this trick:
row("rowstyle")="style='background:yellow'"

if data("FieldName") = "WORD IN FIELD TO MATCH" then

row("rowstyle")="style='background:white'"
I had better luck changing all to yellow and flipping the ones i needed white to white.. hope it helps

F
fenhow author 1/24/2014

Ok, looks like it will work but does not as shown. Can you send me exact code you use to make it work also tell me exactly were to put it?

When I add the code and update my field names the syntax will not verify.

Thanks.

mperry622 1/27/2014

List Page: After Record Processed

I have a field called "description" and the data in that field can say "payment on account" thats when i change it back to white.
I set all backgrounds to yellow and change only rows i want back to white..

My Code:



row("rowstyle")="style='background:yellow'"

if data("Description") = "Payment on Account" then

row("rowstyle")="style='background:white'"
end if


Try this:



row("rowstyle")="style='background:yellow'"

if data("SURFACE PERMIT STATUS") = "PERMIT W/STIPS" then

row("rowstyle")="style='background:white'"
end if


What are the data values in that field?