How can I Automatically Highlite the Current Record in List View
I know it is probably to do with a conditional format but I am not sure how to capture the active/current record to trigger the conditional. Please help.
It can be done but is appears it's not that evident:
It involves setting the curent record Id to a global foeld. But then you have to be carefull about changing the record. Because then your global field needs to be updated.
It depends on the version of Filemaker. If you are using FileMaker 12, you can open layout setup and select the Delineate Fields on Current Record Only. If you define fill or borders for the field, they are now only visible for the current record.
If using an older version, the method DaSaint refers to works and you can use the OnRecordLoad Layout script trigger to perform a script that updates either a global field or global variable that your conditional format then uses to highlight the current record.
Thanks DeSaint and PhilModjunk for your suggestions.
I used the method suggested by DeSaint and found an excellent example file here:
I have one problem though; As I keep hitting the arrow keys the current record eventually moves off the screen. The example file does not act like this. What am I overlooking here? There must be some setting that I have different than the example file. Please help if you can. - Tony
I figured out why it is happening and solve it, I think. If you have a body area that is less than 24 px high and you do not have a field selected (Active) then as you arrow/scroll the current record creeps off the page if you go too far (at least this happens on a mac, I have not tested on windows). The example file that I was working off has a field as the row indicator and it covers the row completely left and right so when you click a row there is always an active field. So as you hit the arrow key the next record's field is active and so on, forcing the record not to scroll off the page as you go. But if you set the body to 23 px or shorter and there is no active field the arrow keys advance the record but they 'creep' past the body area eventually as you keep going. In the example file the active rowhighlite field is not as high as the body so you can click off of it and see what the problem is with the arrow/scroll but you have to set the body to 23 px or less. The body height in my project is a tight 17 px so I have to include a 'go to field' in the listen script which seems to solve the problem. (If you want it to work across many layouts you can pass the field name as a parameter.) I just don't like the hard black outline you get from the field being active so if anyone can think of a better solution please let me know.
Retrieving data ...