GoZync4

Custom Field Mapping

GoZync4.CustomFieldMapping History

Hide minor edits - Show changes to markup

November 20, 2013, at 03:53 PM by 50.132.84.245 -
Added lines 8-9:

(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.)

July 01, 2013, at 01:13 AM by 166.147.88.40 -
Changed lines 46-47 from:
Set is primary key into GoZync::PrimaryID
to:
Set this primary key into GoZync::PrimaryID
July 01, 2013, at 01:09 AM by 166.147.88.40 -
Changed lines 15-18 from:

You'll want to follow the pattern above for every field that you're setting because the names are different.

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_")

to:

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.

Changed lines 23-24 from:
Lots of possibilities here, but imagine you have a notes field and instead of mobile users editing the contents of the hosted notes field you just want them appending to it. You could do something like this in the PUSH branch to append their contents and then clear the notes field on the iPad:
to:
Lots of possibilities here, but imagine you have a notes field and instead of mobile users editing the contents of the hosted notes field you just want them appending their notes above the notes already there. You could do something like this in the PUSH branch to append their contents and then clear the notes field on the iPad:
Changed lines 28-29 from:
Note that in this example, you probably wouldn't want to include gzh_YourTable::Notes on your hosted sync layout (as you wouldn't want to pull all these notes down to the iPad).
to:
Note that in this example, you probably wouldn't want to include gzh_YourTable::Notes on gzh_YourTable's sync layout (as you wouldn't want to pull all these notes down to the iPad).
Changed lines 32-33 from:
You can use Custom Field Mapping to mark a record as checked out when you pull it. You'll write your SetField step in the PULL branch (as in the screen shot above), but the field you set will be one of your "gzh_" fields (one of your hosted fields).
to:
You can use Custom Field Mapping to mark a record as checked out when you pull it. You'll write your SetField step in the PULL branch (as in the screen shot above), but the field you set will be one of your "gzh_" fields (one of your hosted fields). You'll find more details here: checking out records.
July 01, 2013, at 01:05 AM by 166.147.88.40 -
Changed lines 3-6 from:

GoZync syncs the fields on your sync layouts; it does this automatically with you having to write any SetField() script steps.

However, sometimes you may want to write your own SetField script steps. The most common reason is 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 record checkout or just for some extra speed.

to:

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 SetField script steps. The most common reason is 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.

June 25, 2013, at 10:42 PM by 108.38.141.66 -
Deleted lines 20-23:

Accessing other tables

dfrg
Changed lines 28-29 from:
to:
Note that in this example, you probably wouldn't want to include gzh_YourTable::Notes on your hosted sync layout (as you wouldn't want to pull all these notes down to the iPad).
Changed lines 36-48 from:
Using native SetField() steps is a good bit faster than using SetFieldByName() which is what we do when we sync fields on your sync layouts. So if you're looking to squeeze all the speed you can out of your syncs, you can remove all but one field from your sync layouts, and do all the work in SetField() scripts steps within the "Custom Field Mapping: Transformation and Hooks" script.
to:
Using native SetField() steps is a good bit faster than using SetFieldByName() which is what we do when we sync fields on your sync layouts. So if you're looking to squeeze all the speed you can out of your syncs, you can remove all but one field from your sync layouts, and do all the work in SetField() scripts steps within the "Custom Field Mapping: Transformation and Hooks" script.

Accessing other tables

When you're writing the SetFields() steps above you don't have to confine yourself to setting fields within the branch you're working (setting fields within "Customers" in our screen shot above). But if you want to reach other tables you have to do them after the SetFields for the active table.
Let's say that when syncing a customer's info up to hosted you want to set that customer's related eligibility record to "Accepted". Here's how:
After setting any Customer fields, calculate the primary key for the customer's eligibility record. You can do this with FileMaker SQL or by attaching a TO for eligibility to customers.
Set is primary key into GoZync::PrimaryID
Set the customers' eligibility record as you would any other SetField. If there isn't a table occurrence for eligibility attached to GoZync in GoZyncMobile you'll need to add one: if you're not syncing the TO, do NOT prefix it with gzm_ or gzh_.
June 25, 2013, at 10:28 PM by 108.38.141.66 -
Changed line 29 from:
SetField [ gzh_YourTable::Notes ; "Notes entered by " & Get ( AccountName ) & ": " & gzm_YourTable::Notes & "¶" & "¶" gzh_YourTable::Notes ] \
to:
SetField [ gzh_YourTable::Notes ; "Notes entered by " & Get ( AccountName ) & ": " & gzm_YourTable::Notes & "¶" & "¶" gzh_YourTable::Notes ] \\
June 25, 2013, at 10:27 PM by 108.38.141.66 -
Changed lines 27-28 from:
fgshtsd
to:
Lots of possibilities here, but imagine you have a notes field and instead of mobile users editing the contents of the hosted notes field you just want them appending to it. You could do something like this in the PUSH branch to append their contents and then clear the notes field on the iPad:
SetField [ gzh_YourTable::Notes ; "Notes entered by " & Get ( AccountName ) & ": " & gzm_YourTable::Notes & "¶" & "¶" gzh_YourTable::Notes ] SetField [ gzm_YourTable::Notes ; "" ]
June 25, 2013, at 10:12 PM by 108.38.141.66 -
Changed line 35 from:
Using native SetField() steps is a good bit faster than using SetFieldByName() which is what we do when we sync fields on your layout.
to:
Using native SetField() steps is a good bit faster than using SetFieldByName() which is what we do when we sync fields on your sync layouts. So if you're looking to squeeze all the speed you can out of your syncs, you can remove all but one field from your sync layouts, and do all the work in SetField() scripts steps within the "Custom Field Mapping: Transformation and Hooks" script.
June 25, 2013, at 10:10 PM by 108.38.141.66 -
Changed lines 13-14 from:
to:

http://www.seedcode.com/rootimages/stikipad/gozync/custommap.png

You'll want to follow the pattern above for every field that you're setting because the names are different.

Added lines 29-32:

Checking Out Records

You can use Custom Field Mapping to mark a record as checked out when you pull it. You'll write your SetField step in the PULL branch (as in the screen shot above), but the field you set will be one of your "gzh_" fields (one of your hosted fields).
June 25, 2013, at 09:50 PM by 108.38.141.66 -
Changed lines 11-12 from:

All of this is done in the script "Custom Field Mapping: Transformation and Hooks" in GoZyncMobile.

to:

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:

Deleted lines 16-22:

Set fields. Where is this done...

can be used for extra speed can be used to set literals can append to fields instead of overwrite -- leave the power of FileMaker open for the developer to harness,

June 25, 2013, at 09:31 PM by 108.38.141.66 -
Added lines 1-14:

Overview

GoZync syncs the fields on your sync layouts; it does this automatically with you having to write any SetField() script steps.

However, sometimes you may want to write your own SetField script steps. The most common reason is 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 record checkout or just for some extra speed.

You can even write conditional set fields, or use SetField() to append content to a fields instead of replacing it.

Where to make these changes

All of this is done in the script "Custom Field Mapping: Transformation and Hooks" in GoZyncMobile.

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_")

Changed lines 20-34 from:

-- leave the power of FileMaker open for the developer to harness,

to:

-- leave the power of FileMaker open for the developer to harness,

Examples and ideas

Accessing other tables

dfrg

Appending data

fgshtsd

Speed

Using native SetField() steps is a good bit faster than using SetFieldByName() which is what we do when we sync fields on your layout.
June 25, 2013, at 08:35 PM by 108.38.141.66 -
Changed lines 1-6 from:

(:include FieldMapping:)

to:

Set fields. Where is this done...

can be used for extra speed can be used to set literals can append to fields instead of overwrite -- leave the power of FileMaker open for the developer to harness,

July 02, 2012, at 04:29 AM by 50.132.84.245 -
Changed lines 1-3 from:

Zyncing dissimilar fields and tables: Custom Field Mapping or "Transformations"

Coming soon.

to:

(:include FieldMapping:)

June 22, 2012, at 10:29 PM by 50.132.84.245 -
Added lines 1-3:

Zyncing dissimilar fields and tables: Custom Field Mapping or "Transformations"

Coming soon.

(855) SEEDCODE
[email protected]
Follow us: