Solved

FM - Conditional Formatting on Selected Row in a Table

Posted on 2011-03-13
8
1,123 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PDF In Filemaker GO 3 1,171
filemaker server admin console and bonjour 9 447
Variable Drop Down Fields in FileMaker Pro 11 101
FileMaker goes to fields automatically 2 69
Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

749 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