Set field vs Set field by field
What is the difference between the two?
I think you might be referring to the script steps Set Field and Set Field by Name. The latter is new in FileMaker Pro 10.
On the surface they look identical. The difference is in how the target field is specified. In the old Set Field script step, clicking the Specify... button for the target field brings up a dialog to select a field name from the available table occurrences.
In the new Set Field by Name script step, clicking the Specify... button for the target field brings up the Specify Calculation dialog. Here, you can simply select a field or specify an expression that returns a field name. So you have conditional field selection. This goes hand in hand with conditionally specifying field content. So, depending on the situation, field x or field y may receive this or that. All done with one script step!
That may not seem very big news but believe me it is. This is sometimes referred to as 'indirection' - the ability to reference something indirectly. An example of indirection from the real world would be addressing a letter to the CEO of the company rather than using a specific person's name.
In this case, using Set Field by Name, we are now able to calculate the name of the field we want to set rather than having to create a long If/ElseIf/.../EndIf structure.
Retrieving data ...