Versions Compared

Key

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

The following are the Expression Builder Operations that you can use for advanced data field mapping.

Math Functions

Function

Description

Example

Add

Adds two numeric elements.

(10) + (5) returns 15

Subtract

Subtracts one numeric value from another.

(10) – (5) returns 5

Multiply

Multiplies two numeric elements.

(10) * (5) returns 50

Divide

Divides two numeric elements.

(100) div (5) returns 20

Mod

Returns the remainder of a division between two numeric values.

(50) mod (3) returns 2

Ceiling

Rounds a passed number to the smallest integer that is greater than or equal to the passed number.

Ceiling (33.9) returns 34

Floor

Rounds a passed number to the largest integer that is not larger than the passed number.

floor (33.9) returns 33

Number

Converts parameter to a number.

number (“-17.3”) returns -17.3

Number Format

Transforms input data into a specific format.

The specific formats allowed are decimals (up to 2 places) and %.

This function can be used only if the target node is of string data type.

format-number (12.5, ‘$#.00”) returns $12.50

String Functions

Function

Description

Example

Concat

Concatenates the second string after the first string.

This function accepts only two parameters in a graphical mode.

However, there is no limitation to the number of parameters in the text mode.

concat (‘Jane’, ‘Brown’)

returns the string JaneBrown

Substring

Returns the sub string from the string, starting from the specified position and of the specified length.

When using this function, you always start counting its position from 1.

This implies that the second argument (position) is always greater than or equal to 1.

substring (‘abcdef’ ,3, 4)

returns cdef

 

String

Returns the string value of the argument.

string (‘1000’) returns the string 1000

Translate

Translates each occurrence of the first argument in the specified string to the second argument.

Both the arguments must consist of one or equal number of characters.

translate (‘alphabet’, ‘a’,‘t’)

returns tlphtbet

Substring After

Returns the string after the specified argument from the string.

substring-after (‘print=yes’, ‘=’) returns yes

Substring Before

Returns the string before the specified argument from the string.

substring-before (‘print=yes’, ‘=’) returns print

Starts With

Returns true, if the string starts with the specified argument, otherwise false.

starts-with (‘Sales’, ‘S’)

returns True

String Length

Returns the length of the specified string.

string-length (‘adeptia’)

returns 7

Contains

Returns true, if the string contains the specified argument, otherwise false.

contains (‘adeptia’, ‘tia’)

returns True

Normalize Space

Removes leading and trailing white space (space, tab and new line) from a string.

Replaces internal sequences of white space with a single space character.

normalize-space (‘ Adeptia   Inc   ’ ) returns Adeptia Inc

Date Functions

Function

Description

Example

Format Date

This is a customized mapping function.

Changes the date from the input date format to specified output date format.

date-format (employee/ 1998-03-31, ‘yyyy-MM-dd’, ‘dd-MM-yyyy’)

returns 31-03-1998

Date Difference

Generates the difference between two dates in milliseconds.

Supports all Java date formats.

date-difference('12-08-2006','dd-MM-yyyy','12-08-2005', 'dd-MM-yyyy')

returns 31536000000

Current Date

Returns the current system date in Month-date-year format.

Accepts the parameter according to standard Java arguments as defined for SimpleDateFormat class.

current date (‘MM-dd-yyyy’)

returns the current date in month-date-year format.

 Data Streaming

Function

Description

Example

Data To Base64

This function is applicable only, when SOAP is used as a Target application. It converts the input data to base64 encoded string. This function will work only, if the field (on which you are applying the expression) is defined as 'base64Binary' or 'hexBinary' in its WSDL definition.

Maps the entire source stream with a single target field in base64Binary format.

concat('cid:',get-context('attachmentFile','default')) 

returns Base64 encoded data

Conditions

Condition

Description

Example

When

Returns a particular value, if the specified condition is true, else it returns another value.

WHEN Condition {contains (Email_ID, ‘@’)} Value= [100] Otherwise Value= [200]

Returns 100 if the Email_ID contains @, else returns 200

If

Returns a value, if the specified condition is true.

IF CONDITION {#Age=25} Value= [100]

Returns 100 if the Age has the value of 25 in the source record, else the returned value is EMPTY

Iff

Returns the records/elements that matches the set condition.

IFF CONDITION {#Age=25} Value= [100]

Returns only the records that actually have the Age set as 25. The Value parameter is NOT used in this condition.

Operators

Operator

Description

Example

=

Checks if the values of two operands are equal.

If yes, then condition becomes True.

(A=5) 

Returns TRUE if A is exactly equal to 5.

!=

Checks if the values of two operands are not equal.

If values are not equal, then condition becomes True.

(A!=5) 

Returns TRUE if A is not equal to 5.

>

Checks if the value of left operand is greater than the value of right operand.

If yes, then condition becomes True.

(A>5) 

Returns TRUE if A is greater than 5.

<

Checks if the value of left operand is less than the value of right operand.

If yes, then condition becomes True.

(A<5) 

Returns TRUE if A is less than 5.

>=

Checks if the value of left operand is greater than or equal to the value of right operand.

If yes, then condition becomes True.

(A>=5) 

Returns TRUE if A is either greater than or exactly equal to 5.

<=

Checks if the value of left operand is less than or equal to the value of right operand.

If yes, then condition becomes True.

(A<=5) 

Returns TRUE if A is either less than or exactly equal to 5.

or

Called Logical OR Operator.

If any of the operands is non zero, then the condition becomes True.

(A or B)

Returns TRUE if either A or B is not zero.

&

Called Logical AND Operator.

If both the operands are non zero, then the condition becomes True.

(A & B)

Returns TRUE if both A and B are not zero.

Creating Expressions

The following are two samples of creating expressions with Expression Builder.

Using the Concat function

Consider the following schema:

Image Removed

To concat and map the First_Name and Last_Name fields from the Source to the Full_Name field at the Destination:

  • Click the First_Name field from the Source and click the Full_Name field at the Destination.
  • Click the Last_Name field from the Source and click the Full_Name field at the Destination. A green dot appears next to each field, indicating they are mapped.
    Image Removed
  • Click Define Expression to open the Expression Builder.
  • Click the Concat function from the functions list on the left.
    Image Removed
  • Place the cursor to the left of the comma, in the concat function, and click First_Name from the Source. 
  • Place the cursor to the right of the comma, in the concat function, and click Last_Name from the Source. The concat function is now complete.
    Image Removed
  • Click Save to save the mapping.
  • Using the IFF condition

    Using the same schema as the Concat example, assume that you want to retrieve only those records for which employee number is > 1000.

    To do this:

  • Click the Emp_No field from the Source and click the Emp_NO field at the Destination. This maps the Employee Number from the source to the destination.
  • Click Image Removed and select Edit Expression to open the Expression Builder.
    Image Removed
    Click IFF condition. Place the cursor inside the curly braces and select Emp_No from the Source.
    Image Removed
    Click > operator and type 1000. 
    Image Removed
    Click Save to save the expression

    In the application.properties file, you need to specify about Partner self onboard. Depending upon the value specified in this file, Partner self onboard option appears in Adeptia Connect 2.0 UI. Partner self onboard allows Partners to onboard themselves and self-manage their Transactions. 

    To set the Partner self onboard value:

    1. Go to .../<TomcatInstallFolder>/Tomcat 9.0/webapps/Working_Directory/resources_config.
    2. Open application.properties file in any text editor.
    3. Set the value in the app.connect.partner.onboard.mode property. The value can be: internal, external, or ask.

      ValueDescription
      internalAllow Company to manage all the Transactions
      externalAllow Partner to self onboard and self-manage their Transactions
      askAllow either Company or Partner to manage the Transactions
      Info
      By default, the value of this property is set to internal. Once you changed the value of this property from internal to either external or ask, you are not allowed to change the value again to internal.

      Image Added

       

    4. Save the file.