Salesforce

Creating Dynamic Destination Statements (Magic xpi 4.13)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

Creating Dynamic Destination Statements (Magic xpi 4.13)

If you use the Database option as your Destination, you can write your own INSERT/UPDATE/DELETE statements. These statements will be executed "as is", and Magic xpi will not parse them.

In addition, you can define parts of the statement as dynamic by replacing the relevant part of the statement with a tag structured as follows: <!?elementName?!>

You cannot use flow, context, or global variables in the dynamic SQL statement.

Each dynamic section of the statement (<!?elementName?!>) is represented in the Data Mapper as Alpha 1000. This length can be increased in the node's Picture field in the Properties pane.

Example

In the statement shown below, both table name and ID value are dynamic.

In the following mapping screen, the table name and ID value appear as mappable values.

The actual SQL statement is based on the values mapped at runtime to the two elements. Each execution can update the ID field in a different table and with a different value.

  • Because the statement is sent it "as is" to the database, you must make sure that you always use quotation marks when you work with Alpha values.

  • Colons (:) cannot be used in the actual statement, but can be added to statement as part of a dynamic variable value (<!?elementName?!>).

Reference
Attachment 
Attachment