Database Column color format

  • Thread starter Thread starter gcutter
  • Start date Start date
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
 
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
 
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
 
Back
Top