Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

I have a look up table of products with parameters such as style, size, colour etc and of course price.

In another table I have the items ordered which allows you to choose a style, size, and colour and looks up the price form the products table.

I achieve this calculation using a field which contains a concatenated string like this 'style-size-colour' in both tables and a relationship based on this field. I use this relationship to return the price.

It works the first time, but when I change one of the parameters the price is not immediately updated.

How do I force a refresh?

29 minutes ago, Wayne Irvine said:

I achieve this calculation using a field which contains a concatenated string

Is this field a calculation field? Or is it a text field with auto-entered calculated value? If the latter, did you deselect the `Do not replace existing value` option?

P.S. This arrangement is not necessary; you can define the relationship to match on the three original fields directly (assuming you're using version 7 or higher).

P.P.S Please update your profile to reflect your version and OS.

  • Author

It is a calculation field.

On the Relationship, do you make multiple relationship string between the tables?

Profile updated.

4 minutes ago, Wayne Irvine said:

It is a calculation field.

Well, I cannot reproduce your problem (see attached file). When you say you "change one of the parameters", you mean in the Items table, right? In the same table where the lookup field is defined?

CompoundLU.fp7

 

10 minutes ago, Wayne Irvine said:

On the Relationship, do you make multiple relationship string between the tables?

You just add multiple pairs of matchfields in the Edit Relationship window. Or drag between another pair of matchfields to add it to an existing relationship.

  • Author

I got the multiple field relationships working and if I change a field manually it updates just fine. Never knew that was possible.

And I converted my calculations to lookups so the values will remain even if I change the prices later. Thanks for that.

I have one field which is DurNo which is of a calculation. I have a drop down field which is a list of values from a separate table (durations). The values are '1 hour', '2 hours' and 'Half hour' and they have the corresponding values 60, 120, 30. So when you select '1 hour' for the Duration the DurNo recalculates to the corresponding value and I thought this would trigger a recalculation of the cost. No go.

I changed the duration calculation to a lookup as well and it seems to have resolved my problem. Still not really sure why dependent calculations don't update though.

Edited by Wayne Irvine

There is an button in the 'Specify Calculation' dialog called 'Storage Options'. Within that you can select 'Do not store calculation results - - recalculate when needed'.

This may reduce performance, since you are telling FileMaker not to store the results, but it will force recalculation of your field whenever FileMaker needs to reference it. Try choosing that and see if it resolves your problem.

4 hours ago, Wayne Irvine said:

So when you select '1 hour' for the Duration the DurNo recalculates to the corresponding value and I thought this would trigger a recalculation of the cost.

We don't know how cost is being calculated. In general, an unstored calculation will not trigger anything. If cost is a stored calculation, and you want it to recalculate when Duration is modified, you need to reference the Duration field in the cost formula.

BTW, an unstored calculation field that does nothing but copy the related Duration value is redundant; you can simply display the related field directly.

  • Author
On 03/03/2017 at 8:03 PM, rwoods said:

There is an button in the 'Specify Calculation' dialog called 'Storage Options'. Within that you can select 'Do not store calculation results - - recalculate when needed'.

I couldn't use this as it it based on a related field.

22 hours ago, comment said:

We don't know how cost is being calculated.

I will modify your example and see if I can demonstrate. Before I do, can you accept fmp12 files?

21 hours ago, Wayne Irvine said:

can you accept fmp12 files?

I can't, but others can. Or just describe the setup in words.

  • 2 weeks later...
  • Author

I'll go back and see if I can replicate in fm7.

  • 1 month later...
  • Newbies
On 3/4/2017 at 10:40 AM, Wayne Irvine said:

I couldn't use this as it it based on a related field.

I will modify your example and see if I can demonstrate. Before I do, can you accept fmp12 files?

You can use an unstored calc on the left hand side of a relationship, not the right. Take RWoods' advice. It will work.

Wayne,

Just a bit of general advice: Try using multiple predicates, instead of concatenating in another field, and always look for the option of storing values rather than calculating them. With script triggers this has become far easier.

Edited by ShaunB
typo

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.