Jump to content
Sign in to follow this  
toshog

define fields from related databases

Recommended Posts

hi all,

i have a little bit of trouble with a simple math using fields from related databases:

what i'm trying to do is to create a field that substract the value from a field in a related database from the value of a local field. the value of the field in the related database can change whenever.... how can i define i field like that. i define a calculation field that like this:

field calculation = local_field - field_from _related_database

but if the value in the related db changes the calculation doesn't work. i did a field that shows the changed related value and that one does change when the value in the related db changes but the calculation field doesn't do the math...

any help will be appreciated...

Share this post


Link to post
Share on other sites

The calculation should be unstored (this should be the only way possible as one field is related). You may have to refresh the screen to see the changed value. I personally use "Enter Preview Mode" followed by "Enter Browse Mode" in a script for this purpose.

-bd

Share this post


Link to post
Share on other sites

Hello Toshog,

If you are still wrestling with this, here are a couple more things you can try:

If the field in the related database that your calc is referencing is itself an unstored calc, it may be that the chain of external references is too long. I have seen some examples of calcs of this type that update fine in v5.0 but not when running in v5.5. If this is the issue, there are two things which might help:

1. Turn off "Do not evaluate if all referenced fields are empty" setting at the lower left of all the calc options which contribute to the result which is not refreshing.

2. Exit the record before doing a 'Refresh Screen' (either manually or in your script) to force the field to calculate/update.

If a long chain of calculation dependencies could be a contributing factor and you haven't made any headway with the above steps (and/or those suggested by LiveOak), the final resort would be to calculate one of more of the values in the chain via a script which stores the results and can be set to refresh them when needed. This may be a little less convenient for the user, but it may get you going again if this problem is not solved in any other way.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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