Data Manipulation Functions
Caution |
Test the script(s), processes and/or data file(s) thoroughly in a test environment, and customize them to meet the requirements of your organization before attempting to use it in a production capacity. (See the legal notice here) |
Note: The workflow sample mentioned in this article can be downloaded from the Opalis project on CodePlex: https://opalis.codeplex.com |
Overview
A collection of Workflows that demonstrate the use of Data Manipulation Functions and the Format Date/Time Activity.
Getting Started
Launch the Workflow named ‘0.Setup’ by using Start or by running it using the Testing Console.
The Workflow will create a sample input.txt file on your C drive. The sample input.txt file will be used by the other Workflows and has following content:
001;<DATETIME STAMP>;John;Smith;Sales
<DATETIME STAMP> will have the actual data and time from when the Workflow was started.
Example Workflows
1. Data Manipulation Functions
This Workflow uses the Read Line Activity to read line number 1 from ‘input.txt’. It then uses the Send Platform Event Activity to display the result of using several Data Manipulation Functions:
- The original string.
- The string in uppercase letters using the Upper function.
- The second element of the string using the Field function.
- Initial.Last Name, i.e. ‘J.Smith’. This is accomplished by using a combination of Data Manipulation Functions.
Running the example Workflow
Launch the Workflow by using Start, or by running it using the Workflow Testing Console. Check the Opalis Designer Events tab or the Testing Console log to see the resulting output.
More Information
Search the Opalis Online Help for 'Data Manipulation Functions' to see all the available functions as well as examples.
2. Date/Time Manipulation
This Workflow uses the Read Line Activity to read line number 1 from C:\input.txt. It then uses the Format Date/Time Activity to adjust the input Date/Time (the second element from the string that is obtained using a Field function) to one day before:
The adjusted Date/Time is displayed using the Send Platform Event Activity.
Running the example Workflow
Launch the Workflow by using Start, or by running it using the Workflow Testing Console. Check the Opalis Designer Events tab or the Testing Console log to see the resulting output.
More Information
Refer to the Format Date/Time Activity Online Help.
Share this post : |