simple copy and past question
if i want to write a script that copies fields from one table into fields from another table, would i use set field or set field by name. what is the diff between the two? Using FMP 11
Unless you've defined a relationship between the tables, neither step will work without also using set variable to move the data in and out of variables and to and from the two tables and the layouts that refer to them. And this is only one of many ways to do this kind of thing. The best option is to design your database such that this action is not needed though that isn't always possible.
Can you describe what you want to do in more detail?
The difference between set field and set field by name:
Both produce exactly the same result--data from an expression in the second parameter is entered in to the field referenced by the first parameter. The difference is in that first parameter. Set Field uses a direct reference to a specific field. If you select Contacts::Name for the first parameter, Contacts::Name is the only field this step can modify. Set Field By Name refers to a target field indirectly. An expression in the first parameter is evaluated. If it evaluates to a valid TableOccurrence::FieldName, that named field is what is modified by the step. Thus, a set field by name step can modify any number of different fields, controlled by how that first parameter evaluates.
Retrieving data ...