Try using a global field (non-enterable in Browse and Find modes) instead of a field label. Set the global field to "GST" or "HST" depending on the date in a script that is run when the file is opened.
Thanks for your quick response.
I am a newbie at Filemaker and reading I found out how to enter a Global field in a database.
Now, script is a different story, I don't know where to start, is there a way to see an example closely related to my case.
Thanks for any help.
I would probably just use a calculation. Globals are useful, but they have a few quirky things you need to know about them if you are going to use them. Like that they are user and session specific. How to set them so they can be used as defaults in a hosted solution...etc.
Just use an unstored calculation in place of a field label.
Case ( Date > 4/1/2010; "GST" ; "HST" )
This calc will show GST if the date is greater than 4/1/2010 and HST if not. If you need help with the calc...just type out what you want it to do and we can help. For instance, "I want the result to be XXX if this is true, and this if #### is true..." etc.
Thanks Josh, that sounds easier.
The calculation will be:
Case ( Date > 30/6/2010; "HST" ; "GST" )
I don't understand how to insert the "unstored calculation" on the layout.
Thanks for your help.
All you have to do is insert a field, and select which field you want it to display. Among other places, the Insert Menu has the option to add a field.
Tell you what I did, created a new field called "Tax Name" and made it a "Calculated Value" (and Specified: Case ( Date > 30/6/2010; "HST" ; "GST" )) in "Auto-Enter".
Then inserted the field, but it doesn't work.
What am I doing wrong.
You probably have it set as a text field (with Auto-enter options).
Change it from a Text field to a Calculation. It should then bring up the Calculation dialog again...find the options to make is "unstored".
That is it.
Thanks a lot for your patience!
Why not overlay the two labels, 'GST' and 'HST' and use 'Hide object when...' to hide the one that's not applicable? No globals or fields needed.
Case ( Date > 30/6/2010; "HST" ; "GST" ))
Is not correct. Your"date" will evaluate as 30 divided by 6 divided by 2010. / is the division operator.
Date ( 6 ; 30 ; 2010 )