[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

FM - Conditional Formatting on Selected Row in a Table

Posted on 2011-03-13
8
Medium Priority
?
1,151 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 200 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 1800 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

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…
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…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month18 days, 19 hours left to enroll

834 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