
colour select a portal row?
Quote:
> Dear folks,
> Also, any hints as to how to highlight a field that has a certain value
> entered into it.
> Say a field holds data (anumber) and if (anumber>100) then set the fill
> colour to "red".
You can't highlight the field itself, but you can do a work-around that
looks like it does.
Create a global contianer field that holds a "higlight" colour
rectangle. In layout mode, draw a red filled rectangle of the right
size and cut/copy it. Go into Browse mode and paste this into your
highlight field. After you've pasted the rectangle in to you global
highlight field you can delete it from your layouts.
Then use calculation fields that returns a container result and put
them behind the normal (transparently filled) fields to highlight the
right spots. You may have to play with the Graphic formatting of the
field on the layout using croping/scaling until it looks the way you
want.
Example
-------
Define your fields as:
gRed Fill = Global Container with red filled rectangle
anumber Highlight = If (anumber > 100, gRed Fill, "")
[Container result]
Then on the layout, put the anumberHighlight field behind your anumber
field (making sure the anumber field has a transparent fill). Now
whenever anumber is more than 100, the Highlight field will turn red,
otherwise it is empty.
Or, if you want an alternating colour, set up another global container
field which is say a green filled rectangle and change the calculated
field to:
anumber Highlight = If (anumber > 100, gRed Fill, gGreen Fill)
[Container result]
Quote:
> Does anyone know if you can highlight a portal row?
> SAy you select a row to perform an operation via script - can that row be
> highlighted?
If you mean the user highlights a portal row, then they can click in
any blank area (ie. no field) on the portal row for it to highlight.
This is a normal part of FileMaker Pro (at least it is in the Mac
version).
You can also put a button in the portal row that runs the script. Just
define one button and put it in the top portal row on your layout, then
this is replicated to other portal rows whenever they contain data in
browse mode. You can then use the Status(CurrentPortalRow) function if
you need to find out which portal row that is.
From within a script, the Got To Portal Row command has an option to
"Select the contents", which will highlight it in the same way as the
user clicking on a blank area.
If you mean you want to highlight the portal row using a different
colour, you can do the same thing as above for the portal using a
highlight field for each portal row and set the calculation as:
Portal Highlight 1 = If (Status(CurrentPortalRow)=1, gRed Fill, "")
Portal Highlight 2 = If (Status(CurrentPortalRow)=2, gRed Fill, "")
etc.
Or if you are using a script you can use a repeating field and set the
appropriate repetition of the field for the current portal row, making
sure to "clear" out the other repetitions.
Quote:
> My thanks to those scratching their heads over these questions.
> Greg
I hope that all makes some sort of sense to you. :o)
Helpful Harry
"Just trying to help whenever I can." :o)