Calc Fields
GoZync3.CalcFields History
Hide minor edits - Show changes to output
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. =)
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. =)
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. =)
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.
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)
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)