Solved

FM - Conditional Formatting on Selected Row in a Table

Posted on 2011-03-13
8
1,113 Views
Last Modified: 2012-05-11
I've done a lot of conditoinal formatting, but how do yo do this one.  I have a go to RR which lies in a table.  Is there a way to highlight the row that I am on so the customer can see it easier (and I don't want to restrict the number of rows to only the related records or found set for various reasons).  Thanks.
0
Comment
Question by:rvfowler2
  • 4
  • 3
8 Comments
 
LVL 25

Expert Comment

by:Will Loving
ID: 35128527
Welcome to one longest running FileMaker feature requests that I know of, the ability to automatically highlight the currently active row. To my knowledge there is no automatic way to do this that does not involve either some user action - such as clicking on a button that sets global field or variable which you can then key off of for the conditional formatting - or some complex under-the-hood stuff. However, as I'm writing this, it occurs to me that you might be able to use the "On Record Load" script trigger to set a global variable or field and then use conditional formatting to reference that field or variable. I'm totally thinking off the top of my head right now because I haven't tried this, but if you do, let me know if it works.
0
 
LVL 12

Assisted Solution

by:North2Alaska
North2Alaska earned 50 total points
ID: 35128683
I've done something like this before.  I don't recall all the details but it went something like this.

In the portal row create a button that spans the entire row.  Turn off the borders.  Set the button to perform a script that sets the background of the button when that row is selected.

Another method I've seen is putting the fields so that the ends of each field touch so there is no space between them ( you will want to create some space between values using the formatting of each field to have a few pixel indent).  Then color the field backgrounds when the row is selected.
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 35128870
Correct me if I'm wrong Randy, but you are wanting to highlight the current row when in Table view, not a portal row as N2A is referring to? My suggestion was in reference to a Table row, not a portal.

For portal rows, as N2A suggests, you create a button or make the row a button. But you don't have to actually run a script, just use a single Set Field script step to set a global field. then the Conditional formatting formula would just be a simple comparison to see if the Global field value is the same as the value in the related record, in this case a hypothetical Invoice portal from Contacts.

ContactID_Select_g = Contact_Invoice::ContactID

This method would also likely work if you used Set Variable on the button click and a $$ Global variable for the comparison

$$ContactID_Select = Contact_Invoice::ContactID
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 2

Author Comment

by:rvfowler2
ID: 35129722
Yes, I was referring to a row in a table, not one in a portal.  Interesting ideas, though.
0
 
LVL 25

Accepted Solution

by:
Will Loving earned 450 total points
ID: 35131931
See attached file for a simply solution for highlighting the current Table Row. It uses the "On Record Load" layout script trigger (available under Layout Setup in FileMaker Pro 11) and a global variable ($$RecordSerial). The Conditional Formatting simply says

$$ContactID_Select = Contacts::ContactID
Table-Row-Highlight.fp7
0
 
LVL 2

Author Closing Comment

by:rvfowler2
ID: 35132745
Great job, Will, worked perfectly.  Simple but effective.  Although I didn't find any reference to $$RecordSerial.  I think you meant $$ContactID_Select.  Anyway, now all I need is for FM to allowt he ability to put conditional formatting on more than one field at once.

N2A did provide some value added info about condtional formatting on portal rows.
0
 
LVL 25

Expert Comment

by:Will Loving
ID: 35132858
You can apply Conditional formatting to multiple fields by simply selected multiple fields (using Shift-click or by clicking and dragging around them all) and the right click on any one of them to bring up the Conditional Formatting dialog. Formatting will be applied to all.

And yes, you are correct about the misnamed Global Variable.
0
 
LVL 2

Author Comment

by:rvfowler2
ID: 35134105
Thanks Will.  I was moving fast so must have done something wrong with the attempt at multiple fields.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question