Jump to content
Server Maintenance This Week. ×

define fields from related databases


This topic is 7921 days old. Please don't post here. Open a new topic instead.

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...

Link to comment
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

Link to comment
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.

Link to comment
Share on other sites

This topic is 7921 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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