Thank you for your post.
I am unable to replicate the issue. Lookups and auto-enter calculations are re-evaluated when a record is duplicated. Try the following:
1. Create a table with the following fields:
ID - Number
Name - Text
2. Add the following two records:
1 - scottworld
2 - TSGal
3. Create another table with the following fields:
ID - Number (Auto-enter serial number: 1)
Name - Text (Lookup into first table, match Name)
NameText - Text (auto-enter calculation replaces existing value - Name from first table)
4. Create a new record. ID displays 1. Name and NameText displays "scottworld"
5. Duplicate the record. ID displays 2. Name and NameText displays "TSGal"
Let me know what I am doing differently than you so I can reproduce the issue.
No, your example isn't a real duplication, because you changed the value from 1 to 2 upon duplicating using a serial number field... therefore the number changed and therefore the changed number re-triggered the lookup.
I'm talking about values that are MANUALLY typed in by the user. These are retained and not re-looked up, which is actually a good thing. This is actually what we WANT to happen, but FileMaker's documentation is incorrect.
To see this in action, you need to use a NORMAL number field (NOT an auto-enter serial number field) that looks up the text field:
Normal Number field: Number
Text Field: Name (lookup based on number)
On your first record, type in number 2, which would lookup "TSGal" into the text field. But now, manually type in the world "scottworld" into the text field to OVERRIDE the word "TSGal". In other words, you just manually overrode the text field's lookup information ("tsgal") by typing in your own manual information ("scottworld").
Now, duplicate your record. Your newly-duplicated record shows:
So the lookup did not retrigger upon duplication. This is totally 100% fine because this is actually what we WANT to happen, but FileMaker's documentation is incorrect.
This same exact thing happens with an auto-enter calc based on the text field as well.
Thank you for the clarification.
I can confirm the duplicated record does not trigger the lookup. However, the auto-enter calc, based on my example above, does recalculate. That is, if I change the first record to show Name and NameText to "scottworld", when I duplicate the record, I get Name="scottworld" but NameText="TSGal".
Very interesting. I have this checkbox CHECKED: "Do not replace existing value of field (if any)".
In my circumstance, if the auto-enter calculation text field is overwritten with manual text by the user (in the original record), then upon duplication of the original record, the auto-enter calculation text field still retains the overridden manual text that the user manually entered into the field.
However, if you UNCHECK that checkbox (like in your case), then the auto-enter calculation re-evaluates from scratch upon duplication.
So it seems like the auto-enter calculation option acts like this:
1. Upon duplicating the record, the auto-enter calculation will re-evaluate from scratch if that checkbox is unchecked.
2. Upon duplicating the record, the auto-enter calculation will duplicate whatever value is currently in the field if that checkbox is checked.
And the lookup option acts like this:
1. Will not re-evaluate upon duplication.
All of this functionality is totally okay for us, but we would just like to see it clarified in the help documentation for how the "duplicate record" function behaves.
If you have "Do not replace existing value of field (if any)" checked, and you duplicate the record, then there is an existing value, and this value would not be replaced.
To modify your lookup description...
1. Lookups will only be re-evaluated if key field(s) that trigger lookup change.
Right, I see what you're saying about the "auto-enter calculation" situation. I guess the confusion is that everything else on any field options' "Auto-Enter" tab ALWAYS DOES re-evaluate from scratch upon duplication (except for lookups if the key trigger field doesn't change upon duplication), so there's the lingering question as to how "auto-enter calculations" will re-evaluate upon duplication. I guess that both lookups and auto-enter calculations when the checkbox is checked are the 2 exceptions to the rule of record duplication... those are the only 2 things on the "Auto-Enter" tab within field options that WON'T re-evaluate upon duplication.
With the release of FileMaker Pro 16, the Help documentation has been updated for Duplicate Record Request:
"If the record has a field set up for automatic entry of values, this script step does not duplicate the value in the field of the current record. In that case, FileMaker Pro generates and enters a new value for the duplicated record."