Salesforce

Updating a Date Type Variable (Magic xpi 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Updating a Date Type Variable (Magic xpi 3.x)

Magic xpi lets you define variables to pass information in an integration project. Variables are defined as different types. One variable type is Date. These types of variables always contain a calendar date.

If you want to update this variable’s value by using the Flow Data Service with a specific value, you must enter an expression that indicates the date and format you want. For example, to enter the date 21/06/2005, you must enter the following expression: '21/06/2005'DATE. The date format depends on the definition in the [MAGIC_LOGICAL_NAMES] section in your Magic.ini configuration file.

Note:

You can also use the Date() function to update a variable of type date. This function will update the variable with the current date.

Example

The following example demonstrates how to update a flow variable with a specific date.

  1. Open an existing flow or create a new flow in the Magic xpi Studio.

  2. Add a flow variable to your flow and define its type as Date.

  3. From the Components pane at the bottom left of the screen, drag the Flow Data Service to your flow.

  4. In the Flow Data Configuration dialog box, click New and add the following to the line in the table:

    • In the Action column, select Update from the drop-down list.

    • In the Type column, select Flow.

    • In the Name column, click and select the variable you defined from the list.

  5. In the Update Expression column, click to open the Expression Editor.

  6. Enter the required value (date), surrounded by single quotes, and type DATE next to it (with no space between the last single quote and the word DATE). Your entry should look like '21/06/2009'DATE.

  7. Click Verify to check your expression.

  8. Click OK to close the Expression Editor.

  9. Click OK to finish the configuration.

  10. Run the example flow.

Reference
Attachment 
Attachment