GoZync4

Calc Fields

GoZync4.CalcFields History

Hide minor edits - Show changes to output

January 24, 2014, at 10:21 PM by 50.132.84.245 -
Added lines 6-7:

The key is to have a calc on only one side (either mobile or hosted) and that the field only needs to be on the layout you pull from: so put the calc version on the sync layout--we'll pick it up and send it on it's way. If you put the corresponding non-calc version on ITS sync layout, we'll try and send it on its way, and there will be a calc at the other end causing an error. Remember, the only fields you need on a sync layout are the fields you're sending ''from'' that layout.
July 01, 2013, at 12:49 AM by 166.147.88.40 -
Changed lines 3-7 from:
Yes, though you can't sync "into" calc fields. For example, you can have a calculated field in the host that you pull into a regular fields on Mobile. Or you can have a calc'ed field in mobile you push up to a regular field in the host.

But if you have calc fields of the same name in both your hosted and mobile tables, you'll see errors when you check your work in GoZyncHosted and you'll get errors that stop your sync.

For more on calc,
setting literal values, and conditionally setting fields, read up on [[Custom Field Mapping]].
to:
Yes, though you can't sync "into" calc fields. For example, you can have a calculated field in the host that you pull into a regular field on Mobile. Or you can have a calc'ed field in mobile you push up to a regular field in the host.

But if you have calc fields of the same name in both your hosted and mobile tables, you'll see errors when you check your work in GoZyncHosted and you'll get errors that stop your sync: because you can't set values into a calc field, of course.

For more on calcs
, setting literal values, and conditionally setting fields, read up on [[Custom Field Mapping]].
June 25, 2013, at 08:34 PM by 108.38.141.66 -
Changed lines 3-21 from:
Yes, after a simple modification.

By default GoZync will skip any calc
, global, or summary fields on your sync layouts. (You should still remove them from your layouts as that will speed up the sync.)

But there may be times when
you want to sync a calc field, pulling it down from the server and placing it into a non-calc field on the mobile side. (You can't set it into another calc field, obviously, as trying to set calc fields throws errors in FileMaker.) This could be useful, for example, when you want to bring down a contact's credit limit, but that limit is stored in a related table: rather than sync the related table, you could create an unstored calc for this value in the contact's record in your hosted file, and then sync that down to a regular field in the contact's record in your mobile file.

To enable this you need to turn off GoZync's skipping of calc fields. This very easy.

Edit the script "Get Fields { FileName } (LayoutName; LayoutTableName)" in GoZyncHosted and find the line shown in blue below. Remove the "or test" for calc fields. That's it.

%width=500 newwin% [[http://www.seedcode.com/rootimages/stikipad/gozync/calc2.png | http://www.seedcode.com/rootimages/stikipad/gozync/calc2.png]]

If you need to push a calc field, you'd edit a similar script in GoZyncMobile:

%width=500 newwin% [[http://www.seedcode.com/rootimages/stikipad/gozync/calc1.png | http://www.seedcode.com/rootimages/stikipad/gozync/calc1.png]]

Note, GoZync will try to match the field names between the hosted and local tables, so if your cal and regular fields don't have the same name (like one is z_CreditLimitCalc and the other CreditLimit) you'll want to use [[transformations]] to link the two field names.

And remember, in our example above, you won't want the local version of that credit limit on your sync layout on the local side: that would push it back to hosted where setting it into its calc counterpart would fail. =)
to:
Yes, though you can't sync "into" calc fields. For example, you can have a calculated field in the host that you pull into a regular fields on Mobile. Or you can have a calc'ed field in mobile you push up to a regular field in the host.

But if you have calc fields of the same name in both your hosted and mobile tables, you
'll see errors when you check your work in GoZyncHosted and you'll get errors that stop your sync.

For more on calc
, setting literal values, and conditionally setting fields, read up on [[Custom Field Mapping]].
March 18, 2013, at 10:27 PM by 98.245.113.231 -
Changed line 21 from:
And remember, in our example above, you won't want the local version of that credit limit on your sync layout on the local side: that would push it back to hosted where setting it into it's calc counterpart would fail. =)
to:
And remember, in our example above, you won't want the local version of that credit limit on your sync layout on the local side: that would push it back to hosted where setting it into its calc counterpart would fail. =)
January 03, 2013, at 08:29 PM by 50.132.84.245 -
Changed lines 19-21 from:
Note, GoZync will try to match the field names between the hosted and local tables, so if your cal and regular fields don't have the same name (like one is z_CreditLimitCalc and the other CreditLimit) you'll want to use [[transformations]] to link the two field names.
to:
Note, GoZync will try to match the field names between the hosted and local tables, so if your cal and regular fields don't have the same name (like one is z_CreditLimitCalc and the other CreditLimit) you'll want to use [[transformations]] to link the two field names.

And remember, in our example above, you won't want the local version of that credit limit on your sync layout on the local side: that would push it back to hosted where setting it into it's calc counterpart would fail. =)
January 03, 2013, at 07:17 PM by 50.132.84.245 -
Added lines 3-4:
Yes, after a simple modification.
January 03, 2013, at 07:16 PM by 50.132.84.245 -
Changed line 17 from:
Note, GoZync will try to match the field names between the hosted and local tables, so if your cal and regular fields don't have the same name (like one is z_CreditLimitCalc and the other CreditLimit)
to:
Note, GoZync will try to match the field names between the hosted and local tables, so if your cal and regular fields don't have the same name (like one is z_CreditLimitCalc and the other CreditLimit) you'll want to use [[transformations]] to link the two field names.
January 03, 2013, at 06:49 PM by 50.132.84.245 -
Added lines 1-17:
!! Can GoZync Sync Calc Fields?

By default GoZync will skip any calc, global, or summary fields on your sync layouts. (You should still remove them from your layouts as that will speed up the sync.)

But there may be times when you want to sync a calc field, pulling it down from the server and placing it into a non-calc field on the mobile side. (You can't set it into another calc field, obviously, as trying to set calc fields throws errors in FileMaker.) This could be useful, for example, when you want to bring down a contact's credit limit, but that limit is stored in a related table: rather than sync the related table, you could create an unstored calc for this value in the contact's record in your hosted file, and then sync that down to a regular field in the contact's record in your mobile file.

To enable this you need to turn off GoZync's skipping of calc fields. This very easy.

Edit the script "Get Fields { FileName } (LayoutName; LayoutTableName)" in GoZyncHosted and find the line shown in blue below. Remove the "or test" for calc fields. That's it.

%width=500 newwin% [[http://www.seedcode.com/rootimages/stikipad/gozync/calc2.png | http://www.seedcode.com/rootimages/stikipad/gozync/calc2.png]]

If you need to push a calc field, you'd edit a similar script in GoZyncMobile:

%width=500 newwin% [[http://www.seedcode.com/rootimages/stikipad/gozync/calc1.png | http://www.seedcode.com/rootimages/stikipad/gozync/calc1.png]]

Note, GoZync will try to match the field names between the hosted and local tables, so if your cal and regular fields don't have the same name (like one is z_CreditLimitCalc and the other CreditLimit)
(855) SEEDCODE
[email protected]
Follow us: