how to focus or color the record when it is selected in table view ?
nezzih wrote:...but i think it works in list view.could not realize in table view...
...but i think it works in list view.
could not realize in table view...
Whether it will work in Table View depends in part on what step(s) you have in the script that the OnRecordLoad trigger is calling.
Attached is an example that uses a similar technique to the one Kyle mentioned (except it is using a global variable rather than a field to store the record ID), and you'll see that it works fine in Table View.
R J Cologon, Ph.D.
FileMaker Certified Developer
Author, FileMaker Pro 10 Bible
NightWing Enterprises, Melbourne, Australia
I do it like this.
I set a global field with the RecordID by using a OnRecordLoad script trigger. I then use Conditional Formating with the formula MyGlobalRecordID = Get(RecordID) to set the background of each field I want to highlite. This seems to work in both List and Table view.
I color all fields the highlight color then conditional format with formula = 1 and specify white fill (or whatever color you want non-selected fields to be).
Message was edited by: LaRetta (blush, sorry, please ignore me ... you want records instead of fields)
but i think it works in list view.
could not realize in table view.
if it is so can u give more detail?
no problem tks.
it's also useful
tks very much for the example file.
i did it by using a global variable as u mentioned.
also found useful info in yr "bible".
Ray's solution is so much better. I keep getting stuck in the old days when globals were variables. Now days, variables are variables. It also didn't occur to me that the Let() functions would evaluate when used as a script parameter. In the same place that I used the hilite routine, I also hilite fields that are the same in other records (e.g. same customer). It's an overly complex mess. Ray's technique is perfectly suited for that also.
If you use Freeze Window in your HighlightTableRow script instead of Refresh Window, it eliminates the flash. We Windows folks are more sensitive to it than Mac but even Mac will probably notice the difference.
Retrieving data ...