sgonzo Posted February 16, 2005 Posted February 16, 2005 I need to make a calculation only once when I import records. After that, I want to keep the calculated values and use them for Finds, so I would like to change the calculated field into an unmodifiable number field that is indexed. Is there a simple trick to convert calculations to values? I can do it with a script, (copy the information to another field for each record), but wonder if there is a simple trick to do it faster. Thanks for any help.
transpower Posted February 16, 2005 Posted February 16, 2005 Make an auto-enter calculation and do not allow change: "Do not replace existing value for field."
-Queue- Posted February 16, 2005 Posted February 16, 2005 Or simply change the calc to a regular field. It will retain its most recent value.
sgonzo Posted February 16, 2005 Author Posted February 16, 2005 Neither of these worked for me, but I think it's because my calculation references related fields. If(RelatedTableOccurrence:total > (thistable)sum; 1; 0) The 1 goes away with changing to number, or changing to number with auto-enter calculation using do not change values. I guess this is a little much to expect the program to do.
-Queue- Posted February 16, 2005 Posted February 16, 2005 Good point. I had not tested it with calcs using related data. The auto-enter will not effect the existing records unless you change the related data.
sgonzo Posted February 17, 2005 Author Posted February 17, 2005 In playing around with this, I think I discovered something. The change to number from calc doesn't seem to work when you use a self join, and the calculation uses a field from the "child" table occurrence. It does seem to work when you use only a field from the parent table in the calculation. But here the weird part. If I have a calc, say the calcfield = numberfield / 3. If I have a second table occurrence already set up, and then I change calcfield to a number from a calc, I will get <Index if i place the field from the child table occurrence. However, if i change the field to number, and then create the 2nd table occurrence, i can get the number to properly appear in the child table occurrence field. So the logic of the program seems to require a specific sequence of events, or to say it another way the relationship at the time the child table is created seem to define function, and later changes to the parent table aren't recognized? Or perhaps there's a way to force a readjustment in the child. It may all be different if it isn't a self-join. Anyway, I hope my rambling helps someone.
Recommended Posts
This topic is 7566 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 accountSign in
Already have an account? Sign in here.
Sign In Now