2022

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Standard Functions, or built-in functions, refer to specific functions by name. Functions are available to all users of a project. If a project is imported, the same files and functions, from the original project, is available to the cloned project.


Info
titleNote
1) Functions are code sensitive.
2) When you use functions, the string objects must be enclosed in single quotes.
CreatedDate Above mapping will convert the database date field to Salesforce format.IF(boolean LINK(String colName, String value, String fieldName, String refValue, String objectName)
Need to write descriptionThis is a DBSync function different than key identifies the value against the key stored in memory table created by MEMTABLE() function. 
Parameter1: catcheIdentifier is the name of Catcheidentifier used in MEMTABLE() function
Parameter2: key is against which value will be returnedMapping: <TargetField> = MEMLOOKUP(StringCacheIdentifier, StringKey)
Example1: SALESFORCE OBJECT 
In this example, AccountID is the memory Table created on Account object in Salesforce using MEMTABLE() function. 
<TargetField> = MEMLOOKUP("AccountID",VALUE("SourceField") ) 
Example2: DATABASE TABLE
In this example, AccountID is the memory Table created on dbAccount table in database using MEMTABLE() function.
 
<TargetField> = MEMLOOKUP("AccountID", VALUE("SourceField") )MAPPING: <TargetField> = NUMBER("String")
Example: SALESFORCE OBJECT FIELDS
READER: Select Name, NumberOfEmployees from Leads
The above query will select Name and Number of Employees from Leads object in Salesforce. You can use NUMBER () function to convert Number of Employees into integer format for target field. If the VALUE for Number of Employees is null or empty it will return Zero (0).
<TargetField> = NUMBER(*VALUE("NumberOfEmployees"))*This function reads two strings and appends second string to first string basing on the value passed which is the length of the resulted stringMapping: <TargetField> = TODAY()
This function returns string value of the FieldNameName Example 2: SALESFORCE LOOKUP OBJECT FIELDS
READER: Select Id, Name, Account.Name from Opportunity
The above query will select ID, Name and Account Name from opportunity object in Salesforce. You can use VALUE () function to map the lookup field Account Name to the target field.
AccountName

Function

Description

Examples

ADDXML(String xml)

This function adds xml strcuture XML structure to the current element.

{

ADDXML("present element. This function is used when the source application doesn't expose their fields in their API. A user can map the field by modifying the XML structure to post back. This will add the XML on the root node of the target XML structure.

Mapping: <TargetField> = { ADDXML("<xml element>" + VALUE("sourcefield") +

 "</xml element>");return "";}

Example: Database fields 
Trigger: select id,firstname from Contact.

The above query fetches id, firstname from the Contact table of the database.

The table also has "contactaddress" field. As a result, the query will not populate the

"contactaddress" field in the target schema.

Name = {ADDXML("<address>" +VALUE("ContactAddress") + "</address>");return VALUE("Firstname");}

However, the source field can be mapped and source field data populated

into contactaddress column of the database. The contactaddress field is then written to the target application.


ADDXML(String xPath, String xml)

This function appends the XML structure to the XPath passed. This function is used when the source application doesn't expose fields through API. A user can map the field and parse the data.

Let us take an example of custom field SalesRep__c  on the Opportunity object in Salesforce.

Map this field to the SalesRep custom field on QuickBooks online.

To map this field, type custom field name(SalesRep) in the target area

(QuickBook online). And then, add the following query in the source field.


Mapping: <TargetField> = { ADDXML("<CustomField><DefinitionId>2</DefinitionId><Name>SalesRep</Name><Type>StringType</Type><StringValue>"+VALUE("SalesRep__c")+"</StringValue></CustomField>");

return "";

}

Where<DefinitionId>2<:
<DefinitionId>2</DefinitionId>   :Position of custom field in QuickBook QuickBooks online.

              <Name>SalesRep< <Name>SalesRep</Name> : The custom field name in QuickBook QuickBooks online.

               <StringValue>  <StringValue>"+VALUE("SalesRep__c")+"</StringValue> : The custom field in SalesForceSalesforce.

ADDXML(String xPath, String xml)

This function appends xml strucutre to the xpath.


AND (boolean booleanExp1, boolean booleanExp2)

This function returns a boolean value (True or False) for boolean expressions passed inis used to check more than one condition/expression at the same time. It returns true only if both the conditions are met; or else, it returns false.

Mapping: <TargetField> = AND(

Boolean

booleanExp1,

Boolean

booleanExp2

Example :

SALESFORCE OBJECT FIELDS 
READER: Select Id, FirstName, LastName from Contacts 
The above query will select Id, FirstName and Last Name from contacts object in Salesforce. You can use AND() function to check weather first name and last name have same VALUE and Id is equal to 123. If both the conditions are true the function will return true, else it will return false. 

<TargetField> = AND(VALUE("

FirstName

Stage")==

VALUE(

"

LastName

Closed Won"

)

,

VALUE("

Id

Type")=="

123

Key Account") 

From the above example, the function returns true for all the records where

the "Stage" is "Closed Won" and, the Type is "Key Account".


ASNUMBER(String value)

This function checks if a supplied value is a number and returns 0 if it is not a number otherwise returns the actual number. And then, it returns the actual number passed; or else, it returns zero.

MAPPING: <TargetField> = ASNUMBER("String")

<TargetField> = ASNUMBER("123")

If the value for the number of employees is null, or empty, the function will return

a value zero. In this example, the value of the number of employees is '123' so

the function will return 123.


CLEAN(String strings1, String s2)

This function removes all non-printable characters from a supplied string value.


Note: The clean function removes the first 32 (non-printable) characters in the 7-bit ASCII code from the text.


Mapping: TargetField <TargetField> = CLEAN("String VALUE")
Example1: SALESFORCE OBJECT FIELDS
READER: Select Id, Name from Account
The above query will select ID and Name from Account object in Salesforce. You can use CLEAN () function to get the first Character of the Name and set it to target field.
<TargetField> = CLEAN (VALUE("Name"))
Example: <TargetField> = CLEAN (Aºlan)

In the above example, the function removes the non-printable character

and returns the output as "Alan".

CONCATENATE(String... strings )

This function allows you to join two or more text strings together.

Mapping: <TargetField> = CONCATENATE("String1", "string2", "string3")

Example: passing text values

<TargetField> = CONCATENATE("It's", "raining ", "heavily ", "outside.")

The value returned by the function from the above example is "It's raining heavily outside."


CODE(String s)

This function returns the numeric code of the first character of a supplied text value.

Mapping: <TargetField> = CODE("String VALUEtext value") Example1: SALESFORCE OBJECT FIELDS
READER: Select Id, Name from Account
The above query will select ID and Name from Account object in Salesforce. You can use CODE () function to get the first Character of the Name and set it to target field.
<TargetField> = CODE(VALUE("Name"))
Example 2: STRING
<TargetField> = CODE("Salesforce")
The above mapping will put 'S' in the target field

Example : <TargetField> = CODE("Alan Musk")

In the above example the function returns the numeric code of the first character

in the supplied text - namely, "Alan Musk". The numeric value of character

"A" is returned as 65.


DATE(String dateString)This function reads a date string and returns it in the format of "yyyyMMdd-HHmmssZ".

Mapping: <TargetField> = DATE("date string")


Example : <TargetField> = DATE("03-12-2010 12:33:21")

The value returned would be transformed as "20101203-123321".

DATE (String dateString, String inputFormat)

This function reads a date string , user specified date format and returns the date string as per user-specified date format.

If the user-specified date format is not passed then, it passes date string as "yyyyMMdd-HHmmssZ".

Mapping: <TargetField> = DATE(VALUE("SourceFieldsource field"), "format string")

Example 1 : SALEFORCE OBJECT QUERY
Reader: Select Company, CreatedBy, LastTransferDate from Leads
Above query will select Company, CreatedBy and LastTransferDate from leads object in Salesforce. You can use DATE() function to format the passed string to a specific Date Format.
<TargetField> = DATE(VALUE("LastTransferDatelasttransferdate"),"MM-DD-YYYY HH:MM:SS") Above Mapping will convert Date into the Database format of Date Time. If VALUE of LastTransferDate

The value of lasttransferdate is Mar-12-2010 12:33:21. As a result, then

the DATE() function will return value as 03-12-2010 12:33:21
Example 2: DATABASE QUERY
Reader: Select ContactName, CreatedDate from dbContacts
Above Query will select ContactName and CreatedDate from dbAccount table in database.
<TargetField>=.


DATE(String dateString, String inputFormat, String outputFormat)

This function reads a date string and returns the date string as per user-specified date output format.

If the user-specified date input format is not passed then it returns date string as "yyyyMMdd-HHmmssZ".

Mapping: <TargetField> = DATE(VALUE("source field"), "source format", "target format string")


Example : <TargetField>= DATE(DATE(VALUE("

createddate"),"yyyy-MM-ddhh:mm:ss"),

"yyyy-MM-dd'T'HH:mm:ss'Z'")


DATE(String dateString, String inputFormat, String outputFormat)

This function reads a date string, user specified date input format, user specified date output format and returns the date string as per user specified date output format.

If the user specified date input format is not passed then it passes date string as "yyyyMMdd-HHmmssZ"The value of createddate is 03-12-2010 12:33:21, then the DATE()

function will return value as 2010-12-03'T'12:33:21.


DOLLAR(Arg 0)Not implemented yet

This function is currently not supported.


EQUALS(String v1, String v2)

This function compares two supplied string values and returns true if both of the values are an exact match; otherwise, it returns false(case-insensitive).

Mapping: <TargetField> = EQUALS(VALUE("sourcefield"),"text")

Example: <TargetField> = EQUALS("she is beautiful","He is beautiful")

From the above example the function returns false as the first passed string

and the second string does not match.


ERROR()

This function can be used to print error messages to the DBSync console. The function when applied to a target field, returns error messages from the stack trace due to integration failure in user readable formatget the error message for errors during writing to target. This is used in status write back, once an attempt has been made to write the record to the target.

Mapping: <TargetField> = ERROR()

Example: There is an invalid reference to QuickBooks Customer

"Dialysis Center of NW Arkansas: Hidden Springs Dialysis Center" in the

SalesOrder. QuickBooks error message: Invalid argument.

The specified record does not exist in the list.

From the above example, there is an error while writing to

QuickBooks sales order and this error message is written back to the source application.


EXACT(String str1, String str2)

This function compares two supplied string values and returns true if both of the values are an exact match; otherwise, it returns false(case-sensitive).


Mapping: <TargetField> = EXACT(VALUE("SourceField1"), VALUE("SourceField2"))

Example : OBJECT FIELDS
READER: Select Id, FirstName, LastName from Contacts
The above query will select Id, FirstName and Last Name from contacts object in Salesforce. You can use an EXACT() function to check whether FirstName and LastName have same VALUE. If both the fields have same VALUE the function will return true, else it will return false.
<TargetField> = EXACT(VALUE("FirstName"),VALUE("LastNameFirstName"))

The above example will return true as the value of first attribute is "Chris" and the

value of second attribute is also "Chris".


FAST_TLOOKUP(String query)

I have to change description

Returns the value for the column in the query. In the query, only one column can be specified.

FAST_TLOOKUP("SELECT field1 FROM table1 WHERE field2 = '" + VALUE("fName") + "'")
New Syntax Supported
FAST_TLOOKUP("SELECT field1 FROM table1 WHERE field2 = {fName}")


This function looks up a given Id from a passed query and returns the corresponding value. This function is the same as the TLOOKUP function. However, the function executes based on writer batch size for faster execution.


Note: You shouldn't use the special character on the function.The return value of FAST_TLOOKUP

1. should not start with a hyphen
2. should not end with hyphen and 
3. should not be Null.

Mapping: <TargetField> = FAST_TLOOKUP(stringQuery)

Example: QuickBooks Invoice to Salesforce opportunity

AccountID = FAST_TLOOKUP("Select Id from Account where AVSFQuickBooks__Quickbooks_Id__c={CustomerRef/FullName/CustomerRet/ListID}")

In the above example, we are updating the Opportunity object of Salesforce

by reading invoice records from QuickBooks. The query passed inside the function

will fetch the customer List ID (in this case the value of List id is "12345") from QuickBooks.

If a match is found between List id and Salesforce's Account ID then, this will indicate

that the customer's record exists in Salesforce. As a result, related invoice record information from QuickBooks will update information in the related Opportunity object.

FIND(String findText, String withinText)

This function returns the position of the first string parameter, within the supplied second string parameter.


Mapping: <TargetField> = Find(VALUE("SourceField1"), VALUE("SourceField2"))
Example1: STRING PARAMETERS
<TargetField>= FIND("arch","search")

In this example, I will pass the first string as "arch" and the second string as "search".

The FIND() function will return the place VALUE position of "arch" in "search". So it will return 3 as the place VALUE. <TargetField> = FIND("arch","search")
Example2: SALESFORCE OBJECT FIELDS
READER: Select Id, FirstName, LastName from Contacts

The above query will select Id, FirstName and Last Name from contacts object in Salesforce. You can use FIND() function to check whether LastName is already existing in FirstName and If it is not existing in the FirstName it will return 0 else it will return the place VALUE of the LastName in FirstName.
TargetField = FIND(VALUE("LastName"), VALUE("FirstName"))
Note: If the search string exists more than once in the Second string, the function returns the place VALUE of first existencewill return 3 as the value.

Note: If the find text parameter finds value in within-text parameter more than once then,

the function returns the position of the very first instance.


FIND(String findText, String withinText, int startNum)

This function returns the position of the first string parameter within the supplied second string parameter from the passed start index.

Mapping: TargetField = FIND(VALUE("SourceField1"), VALUE("SourceField2"), "Start Position")
Example1: STRING PARAMETERS
TargetField = FIND("arch","search",2)

In this example, I will pass the first string as "arch" and the second string as "search".

The FIND() function will search the string "arch" in "search" starting from the second character and will return the place VALUE

the 2nd position of the "search" string and return the position of "arch" in "search". So it will

The function return 3 as the place VALUE. So characters and first two characters of the string "Search" i.e. 's' and 'e' will be ignored.
TargetField = FIND("arch","search",2)
Example2: SALESFORCE OBJECT FIELDS
READER: Select Id, FirstName, LastName from Contacts
The above query will select Id, FirstName and Last Name from contacts object in Salesforce. You can use FIND() function to check whether LastName is already existing in FirstName and If it is not existing in the FirstName it will return 0 else it will return the place VALUE of the LastName in FirstName.
<TargetField> = FIND (VALUE("FirstName"), VALUE("LastName"),1)
Note: If the search string exists more than once in the Second string, the function returns the place VALUE of first existenceare ignored.


Note: If the findText parameter finds value withinText parameter more than once,

then the function returns the position of the very first instance.


FIXED (Double)This function round off rounds the decimal values up to two digits and returns the rounded round off value.

Mapping: <TargetField> = FIXED("sourcefield")

<TargetField> = FIXED(12.6789)

In the price field the value passed is 12.6789 so the FIXED() function

will return the price value as 12.68.


FIXED (Double, Integer)

This function rounds a supplied number to a specified number of decimal places.

Mapping: <TargetField> = FIXED("sourcefield",1)

<TargetField> = FIXED(14.789,1)

In the price field the value passed is 14.789 so the FIXED() function will return the price value as 14.8.


FIXED (Double, Integer, Boolean)

Not This function is currently not supported


FORMAT(String value, String format)

Get this description checked

This function returns transforms the numeric string passed in the first parameter as a value converted to based on the format specified by passed in the second parameter. Then, it returns the transformed number as a string.

Mapping:

TargetField

<TargetField> = FORMAT("

SourceField1

SourceField", "Format String")

<TargetField> = FORMAT("12","0.00##")

In the above example, pass the first parameter 12 as string and the second parameter as specified decimal format of "0.00##"". The function returns the result string as "12.00".



GETROOTVALUE(String elementName)

This function returns the immediate parent node of an XML element.

Mapping: <TargetField> = GETROOTVALUE("SourceField")

Example : <TargetField> = GETROOTVALUE("Name")

<Contact>
<Name>John</Name>
</Contact>

The "Name" attribute will be compared in the XML and if found, it will return the name value - i.e. "John".


GETSOURCEXML2STRING()

This function returns the string formatted XML structure of the row.

Mapping: TargetField <TargetField> = GETSOURCEXML2STRING(VALUE("SourceField1")))

<TargetField> = GETSOURCEXML2STRING()

<items> <item id="0001" type="donut"> <name>Cake</name> <ppu>0.55</ppu>

</item> ... </items>

The XML elements are returned as a string. In the above example, the input is taken as XML having element has items and returned it as string.


GETSOURCEXML2STRING(String elementName)

Need Description for this


This function returns the string formatted XML structure of the row, for the element name passed.

Mapping: <TargetField> = GETSOURCEXML2STRING("elementname")

Example : <TargetField> = GETSOURCEXML2STRING("batters")

<items> <item id="0001" type="donut"> <name>Cake</name> <ppu>0.55</ppu> <batters> <batter id="1001">Regular</batter> <batter id="1002">Chocolate</batter> </batters> <topping id="5001">None</topping> <topping id="5002">Glazed</topping> </item> ... </items>

The "batters" node element is found in the xml and returned as a string in the following format.

<batters> <batter id="1001">Regular</batter> <batter id="1002">Chocolate</batter> <batter id="1003">Blueberry</batter> </batters>


IF(Boolean condition, String trueValue, String falseValue)

This function tests the user-defined condition and returns one result if the condition is true, and another result if the condition is false.

Mapping : TargetField <TargetField> = IF(String,Integer,String)
Example: SALESFORCE OBJECT FIELDS
READER: Select UnitPrice, Quantity from Product2
The above query will select UnitPrice and Quantity from Product object in Salesforce. You can use IF condition to check if either UnitPrice or Quantity is returning '0' and add a validation accordingly.

TargetField <TargetField> = IF(LENISEMPTY(VALUE("QuantityRate"))==0,"10.00",VALUE("QuantityRate")) TargetField = IF(ISEMPTY(VALUE("Rate")),"0.00",VALUE("Rate"))

In this case, the IF function checks for the value of Rate and finds it to be empty. Then, it returns 0.00 or else it returns original rate value from the Rate field.


ISEMPTY(String s)

This function returns true if the variable is unintialized or explicity set to empty; otherwise, it returns false.

Mapping: <TargetField> = ISEMPTY(STRING)
Example: SALESFORCE OBJECT FIELDS
READER: Select Id, FirstName, LastName from Contacts
The above query will select Id, FirstName and Last Name from contacts object in Salesforce. You can use ISEMPTY() function to check Whether FirstName is Null or Not. If the VALUE for FirstName is null the Function will return true, else it will return false
"sourcefield")

<TargetField> = ISEMPTY(VALUE("FirstName"))

In the above example, the first name field has a value of "Alan" so the function ISEMPTY() returns true.


ISNULL(String s)

Check this description for this is an value/expression

This function checks if the passed expression value is an null value and then, it returns true; Otherwiseor else, it returns false.

Mapping: <TargetField> = ISEMPTY("sourcefield")

<TargetField> = ISNULL(VALUE("lastname"))

In the above example, the first name field has a value of "Alan" so the function ISNULL() returns false.


LEFT (String var)

This function returns the first character of the supplied string which is on left hand side.

Mapping: <TargetField> = LEFT(VALUE("SourceField1SourceField"))
Example1: STRING PARAMETER

Example: passing a string

<TargetField> = LEFT("search")

In this example, I will pass a string as "search". The LEFT() function will return the first character from the right of string "search". So string returned by function will be "s".
<TargetField> = LEFT("search")
Example2: SALESFORCE OBJECT FIELDS
READER: Select Id, FirstName, LastName from Contacts
The above query will select Id, FirstName and Last Name from contacts object in Salesforce. You can use LEFT() function to get first character of FirstName. If the VALUE for FirstName is "salesforce" the resulting string will be "s".
<TargetField> = LEFT(VALUE("FirstName"))LEFT(String var, Int returns the value as "s" which is on the extreme left of the string "search".


LEFT(String var, int count)

This function returns the specified number of characters from the left of the supplied given string.

Mapping: <TargetField> = LEFT(VALUE("SourceField1"), NoOfCharactersnoofcharacters)
Example1: STRING PARAMETER

Example: passing a string

<TargetField> = LEFT("search",3)

In this example, I will pass the first string parameter as "search" and the second parameter as 3. The LEFT() function will return 3 three characters from the left of string the parameter "search" . So string returned by function will be and the function returns "sea". <TargetField> = LEFT("search",3)
Example2: SALESFORCE OBJECT FIELDS
READER: Select Id, FirstName, LastName from Contacts
The above query will select Id, FirstName and Last Name from contacts object in Salesforce. You can use LEFT() function to get first 5 characters of FirstName.

If the VALUE for FirstName is "salesforce" the resulting string will be "sales".
<TargetField> = LEFT(VALUE("FirstName"), 5)
Note: If a number of characters in the stringis less thannumber of characters requested from the function, it will return the full stringNote: If the length of the passed string is less than the second parameter then the function will return a full string as a result.


LEN(String var)

This function returns the length of the supplied a given string.

Mapping: <TargetField> = LEN(String)
Example1: STRING PARAMETER

Example : passing a string

<TargetField> = LEN("search")

In this example, I will pass a the string as "search". The LEN() function will return returns result as '6' which is the length of string "search". So VALUE returned by function will be 6.
<TargetField> = LEN("search")
Example2: SALESFORCE OBJECT FIELDS
READER: Select Id, FirstName, LastName from Contacts
The above query will select Id, FirstName and Last Name from contacts object in Salesforce. You can use LEN() function to get length of FirstName or LastName. If the VALUE for FirstName is "salesforce" the resulting VALUE in LEN() will be 10.
<TargetField> = LEN(VALUE("FirstName"))
Example 3: DATABASE FIELDS
READER: Select Id, FirstName, LastName from dbContacts
The above query will select Id, FirstName and Last Name from contacts in database. You can use LEN() function to get length of FirstName or LastName.. If the value for FirstName is "avankia" the resulting value will be 7.
<TargetField> = LEN(VALUE("FirstName"))

LINK(String colName, String value)
Need to write description


LINK(String colName, String value)


Note: This function is deprecated and an alternative function could be MEMLOOKUP orTLOOKUP functions.


This function reads the second parameter passed through this function and sets it as an attribute to the column name which is passed through the first parameter.

Mapping: <TargetField> = LINK(VALUE("SourceField1"), VALUE("SourceField2"))


<TargetField> = LINK(VALUE("Name"), VALUE("Id"))

In the "Name" node, the "Id" value will be assigned as a default value and the returned value is an object.

LINK(String colName, String query, String fieldName, String refValue, String objectName)


Note: This function is deprecated and an alternative function could be MEMLOOKUP orTLOOKUP functions.

The Link function is used to update Salesforce (Target) field with a source value based on the source identifier that remains unique across Salesforce (Target) as well as Source (Ex: Quickbooks) application.

The function creates an internally cached table querying the target (Salesforce) database with 2 columns, 1st two columns - the first column being the primary key for the table; and, 2nd the second for the other column name.
 
It then looks for a string that is the same across both the Source and Target system before updating the Target LOOK-UP(Salesforce) field with the Source field value.

Example: 
Mapping:

No Format
AVSFQBAVSFQuickBooks__Opportunity__c = LINK("AVSFQBAVSFQuickBooks__Opportunity__c",
"Select id,AVSFQBAVSFQuickBooks__Quickbooks_Id__c from Opportunity",
"AVSFQBAVSFQuickBooks__Quickbooks_Id__c",LSPLIT(VALUE("TxnID"),"-"),
"Opportunity")
No Format
In the above example, we are trying to update Salesforce
look-up field AVSFQBAVSFQuickBooks__Opportunity__cbased on the condition
where AVSFQBAVSFQuickBooks__Quickbooks_Id__c is equal to Quickbooks
transaction Id "TxnID" as they both are same across both
Salesforce as well as Quickbooks.
No Format
In order to update Salesforce look-up field Opportunity
we are creating a cached table with the above query.
Then it does a lookup for all Opportunity records whose
Salesforce field AVSFQBAVSFQuickBooks__Quickbooks_Id__c value matches
with that of Quickbooks field "TxnID".

LOG(Arg 0)

This is not in function2base

LOOP this is not coming in UI

LINK(String colName, String query, String fieldName, String refValue, String objectName, String valueField)

Note: This function is deprecated and an alternative function could be MEMLOOKUP orTLOOKUP functions.


The function creates an internally cached table querying the target (Salesforce) database with two columns - first column being the primary key for the table; and, the second for the other column name.

Mapping: <TargetField> = LINK(VALUE("SourceField1"), VALUE("SourceField2"), VALUE("SourceField3"), VALUE("SourceField4"),VALUE("SourceField5"),VALUE("SourceField6"))


Example : <TargetField> = LINK(VALUE("Name"), VALUE("Id"), VALUE("Phone"), VALUE("Id"), VALUE("Website"), VALUE("PhotoUrl"))

In "Name" node, default attribute values are set in order as "Id" value for "sql", "Phone" for "KeyField", "Website" for "ObjectIs", "PhotoUrl" for "ValueField". The last but second attribute refValue, here it is "Id", will be returned back.

LOG()


This function is used to print the value of a parameter passed to the DBSync console. It can be used for debugging.

Mapping: <TargetField> = LOG(VALUE("SourceField"))


Example : <TargetField> = {LOG("********ChainId"+LEFT(VALUE("Udf_Pa_Pricing"),20));return LEFT(VALUE("Udf_Pa_Pricing"),20);}


The log function gets the value of the target field "udf_pa_pricing" while performing write operation and can be viewed in the logs section for debugging whenever there is an error.


LOOP

This function is different from the conventional '=' operator
used to map Source source and Targerttarget.

<SourceField "loop" TargetField> is used in
scenarios where grouping of the Line Item is Items are required based on the Target target identifier. It can also be used when the identifier is unique and the same across both Source source and Target target systems.

Example1:  Salesforce OppotunityLineItems to InvoiceLineItemsOpportunity LineItems to QuickBooks Invoice LineItems

Mapping <TargetField> : InvoiceAddRq/InvoiceAdd/InvoiceLineAdd InvoiceLine Add [dbsync:loop] "OpportunityLineItems/records"

In the above example, for every Opportunity opportunity Line Item, the loop will create a corresponding Invoice Line Item.

Example2:  Source - Database ; Target - Quickbooks
Database Query : select invoice_no,customerid,item,itemdesc from InvoiceTable
Mapping : InvoiceAddRq/InvoiceAdd/InvoiceLineAdd ? [dbsync:loop]  "invoice_no/list"

In the above example, we are using the "invoice_no" column from the database as an identifier. Based on this identifier, we are grouping each row as a line item and then mapping it with Quickbooks Invoice Line Item.


For exampleinstance, if the database Invoice table has 4 four rows with "invoice_no" - being the same for all the 4 four rows - then, then the mapping will create 1 one Invoice in Quickbooks with 4 LineItems rather thancreating four Line Items - rather than, creating one Invoice for each row.


LOOKUP(String adapterName, String queryString)

The description need to be added


This function searches for a specific value in the source connector where the condition is passed in the form of a query to be searched on the first parameter.

Mapping: <TargetField> = LOOKUP("sourceconnector" , "querystring")

Example:<TargetField> = LOOKUP("Salesforce","select Id from Account where Name='Test'")

Theabove example with fetch the Id from Account object of Salesforce from the source application and assign it to the target field whenever the name field has a value of "Test".


LOWER (String var)

This function converts all character characters in a supplied given string to lowercase.

Mapping: <TargetField> = LOWER(String)
Example1: STRING PARAMETER
Example: passing a string

In this example, I will pass a string as "SEARCH". The LOWER() function will return the string converted to lowercase. So "SEARCH" will be returned as "search" and that VALUE will be placed in target field.

<TargetField> = LOWER("SEARCH") Example2: SALESFORCE OBJECT FIELDS
READER: Select Id, FirstName, LastName from Contacts

The above query will select Id, FirstName and Last Name from contacts object in Salesforce. You can use LOWER() function to get length of FirstName or LastName. If the VALUE for FirstName is "Avankia" the resulting string returned by function will be "avankia".
<TargetField> = LOWER(VALUE("FirstName"))
Example 3: DATABASE FIELDS
READER: Select Id, FirstName, LastName from dbContacts
The above query will select Id, FirstName and Last Name from contacts in database. You can use LOWER() function to get length of FirstName or LastName.. If the VALUE for FirstName is "DBSync" the resulting string will be "dbsync".
<TargetField> = LOWER(VALUE("FirstName"))will return "SEARCH" as "search".


LPAD(String text, String pattern, int pad)

This function is used to pad the left side of a string with the a specific set of characters. The integer is the total length of the string returned after padding.

Mapping: <TargetField> = LPAD(VALUE("SourceField1SourceField"), "string", Int)

Example1:
<TargetField> = LPAD("tech on the net", "0", 15) would

The function will return result as "tech on the net".

Example2:
<TargetField> = LPAD("tech on the net", "0", 18) would return


The function will return the result as "000tech on the net".


LSPLIT(String text, String splitter)

This function returns the split value of the string starting from the left side of a string till the splitter value.

Mapping: TargetField <TargetField> = LSPLIT(VALUE("SourceField"), "string")

Example:
<TargetField> = LSPLIT ("tech-on-the-net", "-")


The LSPLIT() would return the result as "tech".


MAP(String key, String...mapEntries)

This function returns the value against the key passed from the key-value pair(s) passed 2nd parameter onwardsvia the second parameter of the function.

Mapping: <TargetField> = MAP(VALUE("string1", "string2", string3, string4)


Example: <TargetField> = MAP("myKey", "a=b", "c=d", "myKey=myValue")


The MAP function will return "myValue". If the key is not present the in any of the key-value pairs it then, the function will return an empty string.MEMLOOKUP


MEMTABLE(String cacheIdentifier, String

query)

This function

creates a data cache in the system. This data cache will be referred to using cacheIdentifier.
Once MEMTABLE function is called, the cacheIdentifier passed can be used to search data in the query (executed against the target connector).


MAPPING: MEMTABLE(StringCacheIdentifier, StringQuery)

Example: Database Table

MEMTABLE("AccountID","Select ID, Name from dbAccount")

In this example, a cache with the name "AccountId" will be created in the system. It will hold all the id's and names from dbAccount table as key-value pairs.

Assuming we have a_01→Name1, b_01→Name2 as data in dbAccount table, this function will create a map with these key-value pairs in the cache.


MEMLOOKUP(String cacheIdentifier, String key)

This function returns value against the key in the dataset referred by the cacheIdentifier.

Mapping: <TargetField> = MEMLOOKUP(cacheIdentifier, Key)

Example:

<TargetField> = MEMLOOKUP("AccountID", "a_01" ) 


In this example, AccountID is the name of the cache created using MEMTABLE function as explained in the previous example.

This function call will return "Name1" as the value as we have passed "a_01" as the key. Since in the previous example, a map was created as a_01→Name1, b_01→Name2, against the AccountId as cacheIdentifier.

In ideal scenarios, second parameter will not be hardcoded value like in the previous example but some other variable like VALUE("account_id").


For MEMLOOKUP to work, we need to make sure we have created a correct data set using MEMTABLE function.


MEMLOOKUPREGEX(String cacheIdentifier, String key, String regex)

A variant of the This function is similar to MEMLOOKUP function which takes an additionalparamterregex, returns the value of only those key which matches regex

the value whose key starts with prefix, or null if not available

MEMTABLE(String cacheIdentifier, String query)

This Functions creates a memory table in DBSync for Key Valuepair for the Query provided.
Parameter 1: StringCacheIdentifier is the memory table where the key and value pair is saved.
Parameter2: String Query is the query to be executed.
The query should have only 2 columns. First column is value and second column is key column.
Select columnName1, columnName2 from object where condition. where condition is optional.
You can append the MEMTABLE() at the end of any other mapping.MAPPING: <TargetField> = VALUE("SourceField") + MEMTABLE(StringCacheIdentifier, StringQuery)
Example1: SALESFORCE OBJECT 
In this example, I will select Id and Name value from Account Object for all Accounts. 
<TargetField> = VALUE("SourceField") +MEMTABLE("AccountID","Select Id, Name from Account") 
Example2: DATABASE TABLE
In this example, I will select ID and Name value from dbAccount table for all records in dbAccount Table.
 
<TargetField> = VALUE("SourceField") +MEMTABLE("AccountID","Select ID, Name from dbAccount")with an additional check of a regular expression against the key name.

If the passed key matches the pattern passed in the regex, it will return the corresponding value; otherwise, it will return an empty string.

Mapping: <TargetField> = MEMLOOKUP(cacheIdentifier, key, regex)

Example:

<TargetField> = MEMLOOKUP("AccountID", VALUE("account_id"), "^a_" ) 

The above adds an additional regex parameter. It states that the function will match only keys starting with "a_". In this example, the function will not return any value from VALUE("account_id") that doesn't start with "a_".


MID(String text, Int startNum, Int numChars)

This function extracts a substring from the string and returns the substring.

Mapping: <TargetField> = MID(VALUE("sourcefield"), startnum, numchars)

Example : <TargetField> = MID(VALUE("Firstname"), 6, 5)

In this example, the value of "Firstname" is "christopher". So, the function returns the five characters of the "christopher" beginning with the sixth character from the left. The result is "tophe".
NOTEQUALS(String v1, String v2)This function compares the value with another value and returns true if itis not equalselse returns false

NUMBER(String text)

This is not in UI

This function returns an integer value of the string passed to it.

it is not equal; or else, it returns false.

Mapping: <TargetField> = NOTEQUALS("string1","string2")


Example : <TargetField> = NOTEQUALS(VALUE("CurrencyISO"),"USD")


This function compares "USD" against all the values of "CurrencyISO" field. If the function finds there is a value "USD" then, it returns true.


OR(boolean exp1, boolean exp2)

Returns the Boolean value of the condition of 2 parameters passed in.

MAPPINGThis function evaluates the conditions passed through the function and returns true if any one of the condition evaluates to true; otherwise, it returns false.

Mapping: <TargetField> = OR(Boolean, Boolean)

Example : SALESFORCE OBJECT FIELDS
READER: Select Id, FirstName, LastName from Contacts
The above query will select Id, FirstName and Last Name from contacts object in Salesforce. You can use OR() function to check whether first name and last name have same VALUE or Id is equal to 123.
If both the conditions are true the function will return true.
If first condition is true and second condition is false the function will return true.
If first condition is false and second condition is true the function will return true.
If both the conditions are false the function will return false.
TargetField <TargetField> = OR(VALUE("FirstName")==VALUE("LastName"), VALUE("Id")=="123")

In the above function, the 'firstname' has a value "Alan"; the last name has a value "Chris"; and, the Id field has a value of 456. The value of 456 is not equivalent to 123 and hence, the function returns false.


PARAM(String name)

This function PARAM extract extracts the values from the session which is in the format PARAM.SOURCE_Object.Variable=PARAM.TARGET_Object.Variable and returns the variable value.

Mapping: <TargetField> = PARAM(''string'')


Example :<TargetField> = PARAM(VALUE("Description"))

If the value of "Description" starts with "PARAM" and the value is present in the session then, the third text literal is extracted and returned.
PARAM_PARENT(String name)This function PARAM extract extracts the values from the session which is in the format PARAM.SOURCE_Object.Variable=PARAM.TARGET_Object/Variable and return returns the parent value.

Mapping: <TargetField> = PARAM_PARENT(''string'')

Example: <TargetField> = PARAM_PARENT(VALUE("Description"))

If the value of "Description" starts with "PARAM" and the value is present in the session then, the second text literal is concatenated with "/" and third text literal and returned.


PARENTVALUE(String name)PARENTVALUEATTR(String name)This function reads any node elements and returns the immediate parent value of the node element passed.

Mapping: <TargetField> = PARENTVALUE("sourcefield")

Example : Salesforce object fields


Trigger: select Id, name, account.name from opportunity.


The above query will retrieve ID, Name and Account name from Opportunity object of Salesforce.

<TargetField> = PARENTVALUE("Account/Name")

This function retrieves the value of the Account Name - which is a lookup against each Opportunity - and returns to the assigned target field.

PARENTVALUEATTR(String path, String attr)This function reads the passed node element and returns attributes of the immediate parent node.

Mapping: <TargetField> = PARENTVALUEATTR("stringpath","attr")

Example : <TargetField> = PARENTVALUE("CustomerRef","Name")

<CustomerRef>

<Name>Alan</Name>

</CustomerRef>

In this example the CustomerRef object has a Name field in the form of XML. It will return the value as "Alan".


PROPER(String text)This function reads a string and converts the first letter of a word to upper case and rest of the alphabets in a word to lower case. This is used to represent camel notation.

Mapping: <TargetField> = PROPER("SourceField1")


Example: <TargetField> = PROPER("search")

In this example, since Pass string has "search" as the parameter, the function returns the result as "Search".


REPLACE (String oldText, Int startNum, Int numChars, String newText)Returns the value with replacing the newText in oldText for specified start index and a number of chars.
First Param: Old String
Second Param: Start Number
Third Param: Number of Chars
Fourth Param: Replace String

Mapping: TargetField This function replaces a full string, or a part of string text, with another text string from the position sent through parameter i.e. startNum.


Mapping: <TargetField> = REPLACE(VALUE("SourceField1SourceField"), 1, 5, "replace string")
Example1: STRING PARAMETER

Example: Pass a string

<TargetField> = REPLACE("search",3,3,"a")

In this example, I will pass string Pass string has - (1) "search" as the first parameter, ; (2) 3 as start number for the second parameter, ; (3) 3 as a number of characters to be replaced for the third parameter; and, (4) "a" as the replace replacement string. The REPLACE() function will replace three characters from 3rd the third character to 5th the fifth character in the string. The resulting string returned by the function will be "search". TargetField = REPLACE("seaaarch",3,3,"a")
Example2: SALESFORCE OBJECT FIELDS
READER: Select Id, FirstName, LastName from Contacts
The above query will select Id, FirstName and Last Name from contacts object in Salesforce. You can use REPLACE() function to replace specified number of characters of FirstName with specified string. If the VALUE for FirstName is "salesforce" as first parameter, VALUE of start number is 2 as second parameter, VALUE for number of characters is 4 for third parameter, and VALUE of Replace String is "f-", then function REPLACE() will return string "sf-force".
TargetField = REPLACE(VALUE("FirstName"),2,4,"f")
Note: VALUE() function is used inside REPLACE() to convert the FirstName VALUE to string.


REPT(String text, Int numberOfTimes)Returns the string with repeated string value for the This function returns a string consisting of a supplied text string, repeated specified number of times specified.

Mapping: <TargetField> = REPT(VALUE("

SourceField1

sourcefield"), 2)

Example:

 

<TargetField> = REPT("tech", 2) 


In the above example, the function REPT() would return result string as "techtech".


RIGHT(String var)

Returns the last char This function returns a rightmost character of the string value passed.

Mapping: TargetField <TargetField> = RIGHT(String)

Example1Example: STRING PARAMETERString Parameter

In this example, I will pass string as the Pass string is "search". The RIGHT() function will return the first character from the right of the string "search". So string returned by the function will be "h".

TargetField <TargetField> = RIGHT("search",1) Example2: SALESFORCE OBJECT FIELDS
READER: Select Id, FirstName, LastName from Contacts
The above query will select Id, FirstName and Last Name from contacts object in Salesforce. You can use


RIGHT() function to get last last characters of FirstName. If the VALUE for FirstName is "salesforce" the resulting string will be "e".
<TargetField> = RIGHT(VALUE("FirstName"))
Example 3: DATABASE FIELDS
READER: Select Id, FirstName, LastName from dbContacts
The above query will select Id, FirstName and Last Name from contacts in database. You can use RIGHT() function to get last last characters of FirstName. If the VALUE for FirstName is "salesforce" the resulting string will be "e".
<TargetField> = RIGHT(VALUE("FirstName"))RIGHT(String var, Int count)

Returns the This function returns a specified number of chars specified characters from right of the the end of a supplied text string.

Mapping: <TargetField> = RIGHT(VALUE("SourceField1"), NoOfCharacters)

Example1Example: STRING PARAMETERString parameter

In this example, I will pass Pass first string as is "search" and, the second parameter as is 5. The RIGHT() function will return 5 five characters from the right of the string "search". So, the string returned by the function will be "earch".

<TargetField> = RIGHT("search",5)
Example2: SALESFORCE OBJECT FIELDS
READER: Select Id, FirstName, LastName from Contacts
The above query will select Id, FirstName and Last Name from contacts object in Salesforce. You can use RIGHT() function to get last 5 characters of FirstName. If the VALUE for FirstName is "salesforce" the resulting string will be "force".
<TargetField> = RIGHT(VALUE("FirstName"), 5)
Example 3: DATABASE FIELDS
READER: Select Id, FirstName, LastName from dbContacts
The above query will select Id, FirstName and Last Name from contacts in database. You can use RIGHT() function to get last last characters of FirstName. If the VALUE for FirstName is "avankia" the resulting string will be "a".
<TargetField> = RIGHT(VALUE("FirstName"),1)
Note: If number of characters in the string is less than number of characters requested from the function, it will return the full string.
VALUE() function is used to convert the FirstName to string.

RPAD(String var, String value, Int size)


Note: If a number of characters in the string are less than the number of characters requested from the function, it will return the full string.


RPAD(String var, String value, Int size)This function returns a string after padding the input string with extra characters from the right side. The user can pass the size of the input string until where the padding should be done.

Mapping: <TargetField> = RPAD(VALUE("SourceField1"), "string", Int)

Example 1: <TargetField> = RPAD("tech on the net", "0", 15)

The function will return result string as "tech on the net".

Example 2: <TargetField> = RPAD("tech on the net", "0", 18)

The function will return result as "tech on the net000".


RSPLIT(String var, String splitter)This function takes splitter text and compares it with the variable text and . The function splits the variable text basing based on the splitter text and returns character the number of characters after the splitter text to the right of the text.

Mapping: TargetField = RSPLIT(VALUE("SourceField"), "string")

Example: <TargetField> = RSPLIT ("tech-on-the-net", "-")

This function will return result string as return "net".


SEARCH(String findText, String withinText)Returns int value of Boolean if the findText exists in withinText

This function returns the position of a supplied text string from within a supplied text string.

Mapping: <TargetField> = SEARCH(VALUE("SourceField1"), VALUE("SourceField2"))

Example1Example: STRING PARAMETERSString parameters

In this example, I will pass Pass the first string as is "arch"; and, the second string as is "search". The SEARCH() function will return the place VALUE value of "arch" in "search". So it will return 3 as the place VALUEvalue.

<TargetField> = SEARCH("arch","search")
Example2: SALESFORCE OBJECT FIELDS
READER: Select Id, FirstName, LastName from Contacts
The above query will select Id, FirstName and Last Name from contacts object in Salesforce. You can use SEARCH() function to check whether LastName is already existing in FirstName and If it is not existing in the FirstName it will return 0 else it will return the place VALUE of the LastName in FirstName.
<TargetField> = SEARCH(VALUE("LastName"), VALUE("FirstName"))

Note: If the search string exists more than once in the Second second string, the function returns the place VALUE value of the first existenceinstance.


SEARCH(String findText, String withinText, int startNum)Returns the int value of Boolean, if the findText exists in withinText from the startNum of

withinTextThis function returns the position of a supplied text string from within a supplied text string for which starting position can be specified.

Mapping: <TargetField> = SEARCH(VALUE("SourceField1"), VALUE("SourceField2"), "Start Position")

Example1Example : STRING PARAMETERS
String parameters

<TargetField> = SEARCH("arch","search",2)

In this example, I will pass Pass the first string as is "arch"; and, the second string as is "search". The SEARCH() function will search the string "arch" in "search" from the second position in the string and will return the place VALUE value of "arch" in "search". So it will return 3 as the place VALUEvalue. So the character 's' will be ignored.
<TargetField> = SEARCH("arch","search",2)
Example2: SALESFORCE OBJECT FIELDS
READER: Select Id, FirstName, LastName from Contacts
The above query will select Id, FirstName and Last Name from contacts object in Salesforce. You can use SEARCH() function to check whether LastName is already existing in FirstName and If it is not existing in the FirstName it will return 0 else it will return the place VALUE of the LastName in FirstName.
<TargetField> = SEARCH(VALUE("FirstName"), VALUE("LastName"),1)

Note: If the search string exists more than once in the Second second string, the function returns the place VALUE position of the first existenceinstance.


SESSION_GET(String name)This function returns the value of the key sorted stored in the session of that particular Process/process or workflow.

Mapping: <TargetField> = SESSION_GET("KEY")

Example1

Example: Retrieving the

KEY

"key" stored in the session


Reader : Salesforce
Writer  : Quickbooks
Mapping :

.

CustomerAddRq/CustomerAdd/Name = SESSION_GET("Account_Name")

In the above example, we are retrieving the KEY

ie.

, "Account_Name", of the Salesforce Opportunity object stored in the session

and

. The value

that

is being parsed internally

in

that

of what

was stored in the session

,

- "Avankia".


SESSION_PUT(String name, String value)

This function stores the key/value pair in the session of that particular state/workflow which is active. This canbe accessfrom any mapping within the same active state/workflowan active process or workflow. This function will only work with active workflows within DBSync.

Mapping: out <TargetField> = SESSION_PUT("KEY","VALUE")

Example1Example: Storing a static value (Account_Name) in the session
Reader : Salesforce
Writer : ConsoleAdapter
Mapping :
out (target field) = SESSION_PUT("Account_Name","Avankia")
In theaboveexample we are storing
The example stores a static key/value pair for an "AccountName". This assigns the valueAvankia value "Avankia" to the key "Account_Name" - which can be retrieved using SESSION_GET variablePUT variable and printed to the console.


SETATTR(String colName, String attName, String attValue, String colVal)

This function sets the column with an attribute of name and value as specified. The column value would be set as specified in the colVal. Eg: SETATTR("NameThis function can only be applied when writing to Salesforce for the Pricebook object.


Mapping: <TargetField> = SETATTR(TargetField, TargetobjectName, Targetobjecttype, sourcefield1)

Example :SETATTR("PricebookEntryId","priceBookpricebook","Standard PriceBookPrice Book",VALUE("NameItemRef/FullName"))

This function is used to query Pricebook object i.e.( select pricebookentryid where name=standardpricebook and itemref/fullname = pricebookentryid) and if the condition is satisfied it returns the value of pricebookentry id and assigns it to the mapped target field.


SUBSTITUTE(String str, String oldStr, String newStr)This function replaces a set of characters with anotherall occurrences of a string, within an old string, with the passed new string.

Mapping: <TargetField> = SUBSTITUTE("sourcefield", "string1", "string2")

Example: <TargetField> = SUBSTITUTE(VALUE("FirstName"), "John" "Alan")

In the above example all of "firstname" field records - that are having a value as "John" - will be replaced with "Alan".


SUBSTITUTE(String str, String oldStr, String newStr, int occurrences)This function replaces a set of characters with another and number of occurrence can be passed via this function.the specified number of occurrences of a string, within an old string, with the passed new string.

Mapping: <TargetField> = SUBSTITUTE("sourcefield", "string1", "string2", occurences)

Example : TargetField = SUBSTITUTE(VALUE("FirstName"), "John" "Alan",2)

In the above example, the firstname field will have values "John" with "Alan" respectively, for the first two occurrences only.

TEXT(Arg 0, Arg1)Not Currently ImplementedThis function is not currently supported.

TLOOKUP(String queryString)

Returns the value for the column in the query. In the query, only one column can be specified.TargetField

Mapping: <TargetField> = TLOOKUP(stringQuery)

Example1: SALESFORCE OBJECT
In this example, I will select ID value for Account with name as ABC.


Example: QuickBooks Invoice to Salesforce opportunity

AccountID = TLOOKUP("Select Id from Account where

Name

AVSFQuickBooks__Quickbooks_Id__c='"+

"ABC"

VALUE("CustomerRef/FullName/CustomerRet/ListID")+"'")

Example2: DATABASE TABLE
In this example, I will select ID value for Account from dbAccount table with name as ABC.
 
<TargetField> = TLOOKUP("Select Id from dbAccount where Name ='" + VALUE("NAME") +"'")
Here assumption is that NAME field contains value ABC.

TODAY()

Returns Today's Date

In the above example, we are updating the Opportunity object of Salesforce by reading invoice records from the QuickBooks. The query passed inside the function will fetch the customer List ID (in this case, the value of List id is "12345") from the QuickBooks and match it with the Account ID of Salesforce - which, in this case, is also "12345". This means the customer record exists in Salesforce. As a result, related invoice records from QuickBooks will update information in the related Opportunity object.


TODAY()

This function returns Today's date.Format returned from TODAY() is "Day Mon DD HH:MM:SS TTT YYYY"

Mapping: <TargetField> = TODAY()

Example: Fri May 06 07:10:58 CDT 2011.


TRIM(String value)This function returns a text value with the leading and trailing, spaces removed.

Mapping: <TargetField> = TRIM(VALUE("sourcefield"))

Example : <TargetField> = TRIM(VALUE("FirstName"))

In the above example the field of "firstname" has a value " John" so the TRIM() function will remove the leading space and will return the result as "John".


UNIQUEFIELD(String colName, String value, String colValue)

Sets This function sets the column with the attribute of column value and attributes with the unique field and sets the column value.This function returns the value of the key passed in from the Process Definition Sessionvalue and returns as an object.

Mapping: <TargetField> = UNIQUEFIELD(sourcefield, stringvalue, sourcefield value)

Exmaple : <TargetField> = UNIQUEFIELD(VALUE("Name"), VALUE("Id"), VALUE("Phone"))

In "Name" node, the "Id" value will be added as "uniquefield" attribute value and the last attribute is returned as an object.

UPPER(String text)Returns the Uppercase String value

This function converts all the characters in a passed string to the upper case.

Mapping: <TargetField> = UPPER(String)
Example1: STRING PARAMETER
Example: <TargetField> = UPPER("search")

In this example, I will pass Pass string as is "search". The UPPER() function will return convert the lowercase string converted to lowercase. So "search" string will be returned as "SEARCH" and that VALUE will be placed in target field.
<TargetField> = UPPER("search")
Example2: SALESFORCE OBJECT FIELDS
READER: Select Id, FirstName, LastName from Contacts
The above query will select Id, FirstName and Last Name from contacts object in Salesforce. You can use UPPER() function to get length of FirstName or LastName. If the VALUE for FirstName is "Avankia" the resulting string returned by function will be "AVANKIA".
<TargetField> = UPPER(VALUE("FirstName"))
Example 3: DATABASE FIELDS
READER: Select Id, FirstName, LastName from dbContacts
The above query will select Id, FirstName and Last Name from contacts in the database. You can use an UPPER() function to get the length of FirstName or LastName. If the VALUE for FirstName is "Dbsync" the resulting string will be "DBSYNC".
TargetField = UPPER(VALUE("FirstName")

VALIDATEROW()

VALUE(String xPath)


VALIDATEROW()This function returns true and is used only for validation of a rule section to check whether any condition is satisfied.

Mapping: <TargetField> = Conditional Statement

Example: <VALIDATEROW> = IF(ISEMPTY(VALUE("OpportunityId")),"true","false")

This condition will execute a row only if the field of "opportunityid" has a value and returns true; or else, it returns false. In the above example, the opportunitydid has a value of null and returns false.


VALUE(String xPath)

This function converts the input parameter to be read as string and returns the passed value as string.

MAPPING: TargetField = VALUE("SourceField")

Example 1: SALESFORCE OBJECT FIELDS
READER: Select Id, Name from Account
The above query will select ID and Name from Account object in Salesforce. You can use VALUE () function to map the VALUE of name field to target field.
: <TargetField> = VALUE("Name")

In the above example the "Name" field is read as string by the system. The "Name" field has a value of "John" which in itself is returned as string.

VALUE(String xPath, boolean treatAsEmpty)This function converts the input parameter to be read as string and returns the passed values as string. The function returns empty string if the parameter has no value in it.

MAPPING: TargetField = VALUE("

SourceField", true)

XML Sample :

<person gender = "female">

<firstname>Alan</firstname>

</person>

<TargetField> = VALUE("

person/

firstname", true)

VALUE(String xPath, boolean treatAsEmpty)

In the above example, as the "firstname" attribute has a value of "Alan" so the function will return "Alan". To understand better, let us assume the firstname has no value in the attribute so the function returns the string as empty string as, the second parameter is set to true.


VALUEATTR(String xPath, String attr)This function takes a path and attribute name on . And, it and returns the actual value of the attribute.

Mapping: TargetField = VALUEATTR("xpath","name")

XML Sample :

<person gender = "female">

<firstname>Alan</firstname>

</person>

<TargetField> = VALUEATTR("person", "gender")

In the above example, the function returns second passed attribute value i.e. female from the xml sample.