Jump to content
Sign in to follow this  
Wayne Irvine

Calculation updates

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

It is a calculation field.

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

Profile updated.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
21 hours ago, Wayne Irvine said:

can you accept fmp12 files?

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

Share this post


Link to post
Share on other sites
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

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  

  • Similar Content

    • By ShelCOYS
      Hi, I have fm 14 server running on a mac mini. I have recently upgraded to FM16 running Mojave on 2 x local macs. We started with one license, where only one of us could use FM at a time (as we knew), I have since bought another copy and and reinstalled FM16 on the local mac with the new serial number but the server still seems to think we are using the same copy?? and we are getting the attached error. I have completely uninstalled FM locally but still does not work. I have asked my FM guy, as well as 2 or 3 other people but everyone seems to be stumped?? Is there any way of clearer the cache which may be holding this old information? Any help would be much appreciated.

    • By Gaohan
      Dear all,
      I'm new here so forgive me if not posted in the correct location. We have the following situation for which we do not know how to continue:
      We have Filemaker server running on a windows server. The server is accessed through its local ip address (in the 10.10.10.x block). For an internal application I would like to extract information from a FileMaker database for usage in another application. Initially, I used the xmlresultset grammar. It works for when requesting the databases hosted on the server (i.e. : http//10.10.10.x/fmi/xml/fmresultset.xml?-dbnames returns the expected result). However, when I attempt to retrieve a list of layouts that are available I keep getting an empty body result:
      http://10.10.10.x/fmi/xml/fmresultset.xml?-db=Test&-layoutnames Returns the following contents (Note the content-length = 0):
      [Chrome section: General] Request URL: http://10.10.10.x/fmi/xml/fmresultset.xml?-db=Test&-layoutnames Request Method: GET Status Code: 200 OK Remote Address: 10.10.10.x:80 Referrer Policy: no-referrer-when-downgrade [Chrome section: Response header] Content-Length: 0 Content-Type: text/xml;charset=UTF-8 Date: Mon, 19 Nov 2018 16:01:06 GMT Server: Microsoft-IIS/10.0 X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-Powered-By: ARR/3.0 X-XSS-Protection: 1; mode=block [Chrome section: Request headers] Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8 Accept-Encoding: gzip, deflate Accept-Language: en-US,en;q=0.9,nl;q=0.8 Authorization: Basic XXXXXXXXXXXXX Cache-Control: max-age=0 Connection: keep-alive Cookie: JSESSIONID=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.jwpc1 DNT: 1 Host: 10.10.10.x Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36 I specifically made a layout that should return content as a table view of the records.
      I have verified with PHP, and it shows the same problem.
      I have read on some forum that layouts should be made available through web-publishing as well. How to do this? I cannot find it in the documentation.
      What else am I missing?
      Hoping for an answer!
    • By Richard Fincher
      My production Filemaker Server 14 running on Mac OS X 10.11 El Capitan (Not Mac OS X Server) has been running fine for a year since I last installed the Thawte SSL Certificate.  After renewing the certifate this year, I've tried various different methods of importing the new certificate, which came with an intermediate certificate, but I can't seem to get the intermediate certificate installed.  I've been mostly using something like:
      sudo fmsadmin certificate import --keyfile /Users/richardfincher/Desktop/GBROOMX36-4X/private.key /Users/richardfincher//Desktop/GBROOMX36-4X/ssl_certificate.crt
       
      I've also tried importing it through the web control panel.  It was necessary to remove the old private key thus.:
      sudo rm /Library/FileMaker\ Server/CStore/serverKey.pem
      After it is (apparently) installed, I usually restart with :
      sudo fmsadmin restart adminserver
      although a few times I have rebooted the server (not a VM)
       
      Any thoughts welcome....
       
      Oh, one thing is, a year ago it might have been still on Mac OS X 10.8.5 Mountain Lion, which was the previous OS before I upgraded it.
    • By Qam Qam
      hello every one 
      there is a way to send SMS without any plugins , 
      there is a teacher named (guy setvens) who have course on udemy to explain it , problem is its paid , i i cant afford it 
      any one knows how to do it 
      please 
      i have bought 10000 SMS with api form sms provider 
      but i dont know how to use it without plugins 
       
    • By Qam Qam
      Hello every one 
      i want to mention multiple filed in the email 
      like agent name 
      created by 
      and date of creation 
      to be sent to the manger 
      now i can only send one field  in the email 




×

Important Information

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