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
Solved

FM - Conditional Formatting on Selected Row in a Table

Posted on 2011-03-13
8
1,119 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

 
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 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