14 Replies Latest reply on Jan 16, 2013 12:04 PM by jcooper

    12.0v3 alters Conditional Formatting Refreshes



      12.0v3 alters Conditional Formatting Refreshes


      FileMaker Pro


      12.0v3 Advanced

      Operating system version

      Mac 10.6.8

      Description of the issue

      Just upgraded to v3 and something that worked fine until now, no longer functions consistently.

      Steps to reproduce the problem

      Add a button to a layout and set its text to a merge variable  merge variable <<$txt>> (yes, a local variable).

      Set the hover style to be a gradient.

      Set conditional formatting for the text label to

      Let([f=Get(FoundCount);r=Get(RecordNumber);$txt=Case(f=0;"(no records)";f=1;"1 record";r & " of " & f & " records")];0)

      Expected result

      As the user goes from record to record, the label changes to reflect which layout the user is viewer.  This worked fine in 12.0v2

      Actual result

      It only seems to refresh when I mouse over the button, Interestingly, if I duplicate the button, the duplicated one behaves as expected.  So, it seems the problem is with objects created in v2 or earlier. Duplicating containers of the button (such as a tab control)  does not fix the problem

      Configuration information

      in attached screenshot, both "x of x records" buttons are identical in condition and formatting.  The one on the right was duplicated from the one on the left after upgrading to v3.


      Still looking...


        • 1. Re: 12.0v3 alters Conditional Formatting Refreshes

               Jeff Cooper:

               Thank you for the post.

               If I understand correctly, the only way to duplicate this behavior would be to first create the button in FileMaker Pro 12v2 and then update to FileMaker Pro 12v3? Also, recreating the button in FileMaker Pro 12v3 fixes the behavior? 

               If I understand correctly, please let me know and I will attempt to duplicate on my end.

               FileMaker, Inc.
          • 2. Re: 12.0v3 alters Conditional Formatting Refreshes

                 That seems to be correct.  The button was originally created in v2.  When I updated to v3 I noticed the refresh problem.  I duplicated the button in v3 and the duplicate seems to refresh correctly.

                 BUT ... and I just had a chance to try this last night. If I (still in v3) delete the original button, then the duplicate no longer refreshed properly. This leads me to believe that the $txt value that is set in the condition calculation is not being returned in time for <<$txt>> to draw on the screen.  Perhaps the second button is reading the new $txt value from the original button?? I'm not sure, but something like that seems to be happening.

                 For now a workaround is to use embedded get functions like {{currentrecord}}, but I'd like to find a way for it to set a variable and have it display so I can have things like "no records" instead of "0 of 0 records" appear without adding fields to tables just for UI purposes.



            • 3. Re: 12.0v3 alters Conditional Formatting Refreshes

                   Before 12 was ever released some developers would put a text object on their layout with text such as "I declare variables" and put the let function in its conditonal format to assign the values to the variable. The conditional format would be set to evaluate to true and the format applied would make this text invisible when not in layout mode.

                   That method may work here as a work around.

              • 4. Re: 12.0v3 alters Conditional Formatting Refreshes

                     Yes, thanks. I've used that method quite often myself.  But it was always a bit clunky because I had to be sure what was in front / behind of what and/or set the formattibg to not only turn it into the background color but shrink the font to 1 point and subscript it so users wouldn't see pieces of the text poping out over other visible text.  I may need to go back to this method here.  Too bad though, this was looking like a really powerful, albiet unofficial feature of 12.

                • 5. Re: 12.0v3 alters Conditional Formatting Refreshes

                       To hide the text, set the font size to 100+ That does not require back ground matching and it can even overlap other items and not obscure them.

                  • 6. Re: 12.0v3 alters Conditional Formatting Refreshes

                         Wow,  Very cool. Thanks.  Strange that that works though since just setting the text that big without conditions just .. sets it that big.

                    • 7. Re: 12.0v3 alters Conditional Formatting Refreshes

                           When you manually change the font size, FileMaker resizes the text block to fit. A conditional format does not. You can hide button text and text in fields with the same conditional format method--but a representative from SeedCode recently commented that setting the size to 500--the max font size you can select, can have a major performance hit in FMP12 when the layout refreshes, so I've try to set the minimum size change needed to make the text disappear.

                      • 8. Re: 12.0v3 alters Conditional Formatting Refreshes


                             I can confirm this change in behavior from 12.0v2 to 12.0v3.

                             I was declaring variables -- for things like Get(RecordNumber) and Count(child::ID) -- via Let() statements within conditional formatting directly on those merge variables.  In 12.0v2 the merge variables redrew immediately, so they kept in-step as I flipped through records, changed my found set, or changed the contents of a portal.  In 12.0v3 those all stopped working.  Most times a Refresh Window script step would correctly redraw them, but not always (and this was never needed in 12.0v2).

                             It makes no difference whether these are created in v2 or in v3.

                             I also noted this behavior change on TechTalk and uploaded a screencast showing the difference between versions (on a file that someone had posted to the thread).  I show the Get(RecordNumber) change starting at 0:45 in the video.




                             I can switch to using {{currentrecord}}, but for calcs like Count(child::ID) I'll need to either add a Refresh Window script step or just switch back to using a Web Viewer with a Data URL -- which *does* still update/redraw immediately and correctly.

                             In 12.0v2, this functionality removed the need to use Data URLs in Web Viewers for "layout calcs", which was awesome.  In 12.0v3, not so awesome :(



                        • 9. Re: 12.0v3 alters Conditional Formatting Refreshes

                               For now I've downgraded back to v2. Ever the optomist, I'm hoping this is will get undone in v4.  Otherwise, I need to seriously rethink/re-do a boatload of work on upgrading a large custom solution to 12.  Luckely, the issues v3 fixes haven't really been a problem so far. We'll see...

                          • 10. Re: 12.0v3 alters Conditional Formatting Refreshes

                                 After a few months workong on other projects I came back to tackle this again.  Not sure if there are very few who used this method to display dynamic data without the need for special UI fields and so forth, but I'm not giving up.

                                 It looks like even scripting a Refresh command does not update the value displayed in the merge variable.  Only mousing over (thereby changing the background color or some other UI feature) updates the displayed value.
                                 When using the above calculation to set $txt it seems the value is set but just not dispayed.  If I go to the next record the merge variable appears blank.  If I mouse over it, the last value THAT WAS DISPLAYED appears.  When I move the mouse off of the object, the current value of $txt id displayed.
                                 It looks like whatever they did to improve performce (as per the release notes) altered the order in which things happen (display vs setting values by Let()).
                                 Joel's video above demonstrates it well. I have linked another video I took (sorry, no narration) of the mouse in/out refresh occurring.  Watch the button text as the mouse move in and out of the button.
                                 (it's not embedded so right-click and download)
                            • 11. Re: 12.0v3 alters Conditional Formatting Refreshes

                                   Hi Jeff

                                   Sorry to be the bearer of bad news, but I confirmed w/ an FM engineer that the behavior that you and I both enjoyed in 12.0v2 is gone in v3, as part of a bug fix.  It was a very nice side-effect of the bug, but we can't expect it to come back.

                                   Bummer, eh?


                              • 12. Re: 12.0v3 alters Conditional Formatting Refreshes


                                     Thank you for the post.

                                     Is there any reason adding other symbols or a merge field on the layout couldn't be used to achieve the same results?

                                     Example #1 (Edit layout>Insert>Other Symbols...):

                                     {{RecordNumber}} of {{FoundCount}}


                                     This example can be placed directly on the layout and requires no additional fields.


                                     Example #2 (Unstored Calculation Field "Record"):


                                     Get ( RecordNumber ) & " of " & Get ( FoundCount )


                                     This example allows the merge field <<Record>> to be placed on the layout and requires a single calculation field. 


                                     Both examples update and refresh without the need for scripts or even setting a single variable. 



                                     FileMaker, Inc.

                                • 13. Re: 12.0v3 alters Conditional Formatting Refreshes

                                       Oh. that's unfortunate to say the least. I hope somebody working there has enough insight to realize how powerful this was and they bring it (or something like it) back as a documented "feature".

                                       Looks like  got some (more) work-arounds to do....

                                       Thanks for the update.


                                  • 14. Re: 12.0v3 alters Conditional Formatting Refreshes

                                         Hi TSFalcon,

                                         Yeah I'll probably do something like that.  But the local (or even global) variable option allowed the changing of the text based on values without the need for suprflouus fields, so instead of displaying "1 of 1 Records" you would see "1 Record" or insead of "0 of 0 Records" it would have "No Records".; imho much more professional looking.   I had been using a similar technique for all sorts of things baed on privilege sets, related counts, etc., basically anything to be calculated and displayed but not stored (as is preferred for many UI controls in a separation model).   I'll need to go back to hiding/showing text labels combined with symbols..