GoZync3

Set Field Transformations

GoZync3.SetFieldTransformations History

Hide minor edits - Show changes to output

August 05, 2013, at 04:23 AM by 50.132.84.245 -
Added lines 1-2:
(:include NewerDocs:)
December 19, 2012, at 11:48 PM by cm - minor edits and clarifications
Changed lines 5-6 from:
The fields on your mobile and hosted files may be different. They may have different names or need to contain really different data.
to:
The fields on your mobile and hosted files may be different. They may have different names, or need to contain different data.
November 21, 2012, at 08:20 PM by 50.132.84.245 -
Changed lines 38-39 from:
->Let ( [
to:
Let ( [
November 21, 2012, at 08:19 PM by 50.132.84.245 -
Changed lines 37-38 from:
Let ( [
to:

->
Let ( [
Added line 52:
November 21, 2012, at 08:19 PM by 50.132.84.245 -
Changed lines 35-36 from:
Add an ElseIf for each field name you want to manipulate, and then end with an Else setting the $fieldname to the untransformed $fieldValue. When you're transforming, remember that  $fieldValue will sometimes be blank, so take that into account in your calc.
to:
Add an ElseIf for each field name you want to manipulate, and then end with an Else setting the $fieldname to the untransformed $fieldValue. When you're transforming, remember that  $fieldValue will sometimes be blank, so you might use a calc like this if you were transforming dates:

Let ( [

t = $fieldValue ;
sp = Substitute ( t ; "/" ; "¶" )

] ;

if ( isempty ( t ) ; "" ;
Date ( GetValue ( sp ; 2 ) ; GetValue ( sp ; 1 ) ; GetValue ( sp ; 3 ) )
)

)


November 21, 2012, at 08:02 PM by 50.132.84.245 -
Changed lines 35-38 from:
Add an ElseIf for each field name you want to manipulate, and then end with an Else setting the $fieldname to the untransformed $fieldValue.

You can do this
in both GoZyncMobile and GoZyncHosted.
to:
Add an ElseIf for each field name you want to manipulate, and then end with an Else setting the $fieldname to the untransformed $fieldValue. When you're transforming, remember that  $fieldValue will sometimes be blank, so take that into account in your calc.

You can do this in the SetField script
in both GoZyncMobile and GoZyncHosted.
November 21, 2012, at 07:34 PM by 50.132.84.245 -
Changed lines 29-30 from:
Rather than putting the name in quotes as in our screen shot, wrap it in the GetFieldName() function like this:
to:
Rather than putting the name in quotes as in our screen shot, wrap it in the GetFieldName() function like this...

-> $fieldname = GetFieldName ( Contacts
::LastName )

...as that will protect you if you ever change the way "LastName" is spelled in field definitions.

Changed lines 37-38 from:
You can do this in both GoZyncMobile and GoZyncHosted,
to:
You can do this in both GoZyncMobile and GoZyncHosted.
November 21, 2012, at 07:33 PM by 50.132.84.245 -
Added lines 29-30:
Rather than putting the name in quotes as in our screen shot, wrap it in the GetFieldName() function like this:
November 19, 2012, at 06:19 PM by 50.132.84.245 -
Changed lines 21-33 from:
sasffasf
to:
The first thing to do is copy the calc part of that SetFieldByName step (the long let statement that gets the field value) and set that to a variable called $fieldValue. You'll see that as the first line in blue in the screen shot above.

Then create an If statement for each field you'd like to transform, testing the field name. Remember this is the field name in the mobile / hosted side you're working on. So if you're editing this script in GoZyncMobile, you're looking for the name of your Mobile field.

And the field name here is the '''full''' field name, like this:

-> Contacts::LastName

Add an ElseIf for each field name you want to manipulate, and then end with an Else setting the $fieldname to the untransformed $fieldValue.

You can do this in both GoZyncMobile and GoZyncHosted,

Enjoy!
November 19, 2012, at 06:09 PM by 50.132.84.245 -
Changed lines 15-16 from:
%center%[http://www.seedcode.com/rootimages/stikipad/gozync/SetFields1.png
to:
%center% http://www.seedcode.com/rootimages/stikipad/gozync/SetFields1.png
November 19, 2012, at 06:09 PM by 50.132.84.245 -
Changed lines 15-16 from:
%center% [[http://www.seedcode.com/rootimages/stikipad/gozync/SetFields1.png]]
to:
%center%[http://www.seedcode.com/rootimages/stikipad/gozync/SetFields1.png
Changed lines 19-20 from:
%center% [[http://www.seedcode.com/rootimages/stikipad/gozync/SetFields2.png]]
to:
%center% http://www.seedcode.com/rootimages/stikipad/gozync/SetFields2.png
November 19, 2012, at 06:09 PM by 50.132.84.245 -
November 19, 2012, at 06:08 PM by 50.132.84.245 -
Added lines 15-21:
%center% [[http://www.seedcode.com/rootimages/stikipad/gozync/SetFields1.png]]

In order to transform the contents of a field during the sync, you'll replace this line with a few IF statements and calcs. The final result is shown below. After the screen shot we'll walk you through making this change.

%center% [[http://www.seedcode.com/rootimages/stikipad/gozync/SetFields2.png]]

sasffasf
November 19, 2012, at 06:06 PM by 50.132.84.245 -
Changed lines 3-14 from:
=)
to:
'''Overview.'''

The fields on your mobile and hosted files may be different. They may have different names or need to contain really different data.

If the only thing you need to deal with is that your fields have different names, you can handle that in the [[field mapping | custom field mapping]] section of GoZync's integration.

If, however, you need to change the data from one side to the other (like merging first and last names into a full name, or changing date formats
) the instructions below are for you.

'''Editing our Set Field Scripts.'''

You'll find a script called "Set Fields" in both GoZyncHosted and GoZyncMobile. This is the script that actually moves the data from our synced "package" into your fields. This is done with a single SetFieldByName script step shown in blue below.

July 04, 2012, at 06:36 PM by 71.212.48.84 -
Added lines 1-3:
!! Getting in between GoZync and your data: changing our SetField script

=)
(855) SEEDCODE
[email protected]
Follow us: