Custom Field Mapping
GoZync syncs any fields you place on the sync layouts in GoZyncMobile; it does this automatically without you having to write any SetField() script steps.
Sometimes, however, you may want to write your own Set Field script steps. The most common reason would be because the fields in your hosted and mobile files don't have the same names. You may also want to use SetField steps to set literal value into your fields, for checking out records, or just for some extra speed.
You can even write conditional set fields, or use SetField() to append contents to a field instead of replacing it.
(Note that you can do your whole sync using Custom Field Mapping, but you do need at least one field to line up--one matching field name on the sync layouts--even if it's just a dummy field you don't use for anything.)
Where to make these changes
All of this is done in the script "Custom Field Mapping: Transformation and Hooks" in GoZyncMobile. In that script you'll see instructions for creating a branch for each source table whose fields you'd like to transform. Here is an example where we have a field called "name" on the server, but it's called "full name" in the mobile file:
Whenever you have fields whose names are different, you'll want to follow the pattern above.
Be sure to remove any fields you want to set by hand from the source side of your sync layout. (For example, the "source" of a pull is a layout beginning with "gzh_") so GoZync doesn't try to automatically set them to mobile (or hosted, if you're pushing) values of the same name.
Examples and ideas
SetField [ gzm_YourTable::Notes ; "" ]
Checking Out Records
Accessing other tables