Database Column color format

G

gcutter

How do I format a DRW column based on the results of another column? I have a
DRW table that gives status of machines in our plant and if the Status Column
= Stopped I want the Machine Name column to have a red background. I know I
have done this in the past I just cannot find the page or bookmark to the
site where I found out how to do it.

Thanks in advance
 
S

Stefan B Rusynko

In the DBR columns
find the result code in the cell for the "Status" value
- say for example it is:
<%=fp_field("Status") %>
Then in code view find the td cell for "MachineName"

- say for example it is:
<td><%=fp_field("MachineName") %></td>

And change that td code to

<td bgcolor="<% IF fp_field("Status")="Stopped" THEN %>red<%ELSE%>green<%END IF%>">
<%=fp_field("MachineName") %></td>


--




| How do I format a DRW column based on the results of another column? I have a
| DRW table that gives status of machines in our plant and if the Status Column
| = Stopped I want the Machine Name column to have a red background. I know I
| have done this in the past I just cannot find the page or bookmark to the
| site where I found out how to do it.
|
| Thanks in advance
 
G

gcutter

Thanks that got me on the right track to figuring it out. I came up with

<td bgcolor="<% IF FP_FieldVal(fp_rs,"LaserStatus")="Stopped" THEN
%>Red<%ELSE%>Green<%END IF%>">

which is in front of
<!--webbot bot="DatabaseResultColumn" s-columnnames=".....

Thanks,
Greg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top