Jump to content
Sign in to follow this  
Emma in England

Calculated Containers for headings

Recommended Posts

I'm working through 'Using Filemaker 8.5' (Love, Lane, Bowers - don't they sound romantic?). Trying to implement a report where you can sort by column and the sorted-on column changes colour. This uses a script which is passed a different parameter depending on which column heading is clicked. Behind each heading is a global container field with a calculated value, such as:

If($$columnsort="OrderCode";gHighlight)

- where gHighlight is a global container with a coloured box pasted in, and $$columnsort is set by the script parameter.

These calculation fields are set to container, global storage, and 'Do not evaluate if...' is unchecked.

For some reason, they do not change as the script is accessed via the buttons. I've put a field on the page to show $$columnsort's value, and this changes depending on the column header clicked on, but the 'green' field stubbornly stays green. I've tried everything I can think of, so turning to you!

If I cut the coloured box from gHighlight and paste it back in, the correct field becomes coloured. But the calculation doesn't seem to be performed unless kicked in this way. I've never used container fields before, so perhaps I've missed something??

Share this post


Link to post
Share on other sites

I've found 2 workarounds - 1 is to set the container fields inside the script, 2 is to store the calculations as non-globals and make a 'dummy' key field in each table. Both of these work fine, so what am I missing in the book (pages 282-5, if you're interested).

Share this post


Link to post
Share on other sites

Global calculations are stored. Your calculation must be unstored (therefore not global).

Share this post


Link to post
Share on other sites

Ok, thanks. So this is an error in the book? If anyone has it, p283 quite clearly states they should be global. I'm beginning to get my head round this, thanks for pointing it out. At least I've made it work!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.