Jump to content

Trouble figuring out Auto-Enter, Lookups, and Validate by calc...???


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

Recommended Posts

Don't waste too much time reading...I figured out the problem! Sorry.

______________________________

For some reason I can hardly ever get these things to work for me. Sometimes they work just as I expect but when they don't I have no idea why.

For example, in FM now I have a database called InvoiceItems which you can probably guess stores item information for each invoice in our system. 2 fields that currently exist in there are ItemNumber and Description. Description is configured with Auto-enter calculated value. It pulls the description value from a related Products table (which is related by ItemNumber) and updates it. If I uncheck the Do not replace existing value for field box then the Description will automatically update anytime I change the ItemNumber value in the invoice, just as expected. If I check the box then it updates the first time but after that since there's a value it doesn't update anymore, just as expected.

So now I'm trying to get this exact same function out of 2 different fields. I have another table called Scans that is related to InvoiceItems by ScanID in the same way that Products is related by ItemNumber. I have a SerialNumber field that I'd like to Auto-update based on the ScanID that is input into the invoice. I cannot get this to work for the life of me.

Again, InvoiceItems and Scans are related by ScanID. I've configured the SerialNumber field to use the value of Scans::SerialNumber the same way Description uses Products::Description. However, when I fill in a ScanID in the invoice the serial number field will not update. I can't get it to update all no matter what I do with the Do not replace check box. It won't update the first time, not anytime.

What am I doing wrong!? Any information would be greatly appreciated. Thanks!

Edited by Guest
Link to comment
Share on other sites

I am not sure I follow this entirely, but it seems like you want a field in InvoiceItems to update when a field in Invoice is changed? That's not going to happen: an auto-entered calculation is triggered by LOCAL fields only - i.e. fields in the same record, or global fields in the same table. In the second case, only the current record will re-evaluate.

Link to comment
Share on other sites

No, that's not correct. I was saying Invoices because our Invoices file actually has InvoiceItems inside it with a Portal. Both the ScanID field and the SerialNumber field (which is the field I'm trying to update) reside in InvoiceItems.

I'm trying to make it so that when InvoiceItems::ScanID changes it updates InvoiceItems::SerialNumber to equal the value of Scans::SerialNumber, which is related to InvoiceItems by ScanID.

So, I set InvoiceItems::Serial number to use Auto-enter by calc. and set the calc. to Scans::SerialNumber.

This seems to be exactly the same way the Description is configured with the ItemNumber and that works, but I can't make it work with SerialNumber for some reason.

Edited by Guest
Link to comment
Share on other sites

Doh! I just figured it out...this one anyway. I had the wrong field from InvoiceItems used to relate back to Scans. There are 2 fields in there, ScanID and ScanIDUnique. I was using ScanID and didn't see that ScanIDUnique existed. I need ScanIDUnique, though, and now it's working.

Sorry.

Link to comment
Share on other sites

This topic is 6182 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.