Solved

FM - Conditional Formatting on Selected Row in a Table

Posted on 2011-03-13
8
1,087 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 24

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 24

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
 
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 24

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 24

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now