AnsweredAssumed Answered

Conditional Format with Get ( ActiveFieldName) Fails

Question asked by philmodjunk on Oct 20, 2011
Latest reply on Jan 11, 2012 by GianandreaGattinoni

Summary

Conditional Format with Get ( ActiveFieldName) Fails

Product

FileMaker Pro

Version

FMP 11.03

Operating system version

Windows XP, SP3

Description of the issue

About 1 time out of 8, conditional format expression set to change button text to grey if the specified field does not have the focus, fails to change the text color.

This is intended to give a set of buttons that use Insert Text to insert text at the current cursor position a "disabled" look if the cursor is not currently in the field these buttons are intended to modify.

Steps to reproduce the problem

Conditional Format Expression:
Let ( [ F = GetFieldName ( Templates::TemplateText ) ; L = Length ( F ) ] ; Get ( ActiveFieldName )  ≠ Right ( F ; L - Position ( F ; ":" ; 1 ; 2 ) ) )

Add OnObjectEnter, OnObjectExit triggers on the TemplateText field to perform this one line script:
Refresh Window []

Expected result

Clicking in the filed changes the text from Grey to Black. Clicking another field or the layout background changes the text back to grey.

Actual result

On random intervals, the text color does not change when you exit the field. Have added a show custom dialog step to the script to confirm that the window refresh was triggered correctly. (Can't reproduce bug when script debugger is enabled.)

Using the "Flush cached join results" option does not work any better.

Configuration information

A file demonstrating this issue may be downloaded from: http://www.4shared.com/file/Z36UjVOL/MessageTemplateBuilder.html

Workaround

None that I've figured out so far. Will test on Windows 7 platform and report back tomorrow...

Outcomes