Functions
Last updated
Last updated
In DBSync Cloud Workflow, user-defined functions allow users to create custom logic that can be reused throughout their workflows. These functions can perform specific tasks, such as manipulating data or applying conditional logic. This guide will walk you through the steps to create and use a function within your workflow.
Login to DBSync Cloud Workflow: Navigate to the DBSync website and log in with your username and password.
Navigate to the Functions Page: Once logged in, locate the Functions section in the navigation menu.
Create a New Function: Click on New Function to open the Function Creation screen.
Enter a name for your function (e.g., 'fullName') in the designated field.
Code Example: In the code area, define the function using the appropriate syntax;
Save the Function: Click on Save to store your user-defined function. The function will now be available in the User Defined list on the Mapping page.
Create or open a flow where you want to use the function.
Drag and drop a Mapping action into your flow.
Mapping Configuration: In the mapping configuration, you can now call your defined function. For example, if you want to concatenate first and last names, you can use:
To test your function, you can create a Test function that calls your user-defined function with sample data:
After configuring your function and mapping, click the Run icon to execute the workflow.
Monitor the console output to verify that the function works as expected.
If you encounter issues, you can use a Debug action to print the values being processed. This can help you identify any errors in your function or data.
After running the integration, check the console output for any errors or confirmation messages. This will help you understand if the function executed correctly.
PRO TIP
Always test your functions with various sample data to ensure they handle all possible scenarios and edge cases effectively.
Creating and Managing Variables: Learn how to create and manage variables effectively in your workflows.
Conditional Logic in Workflows: Explore various conditional actions, including "If" and "For" conditions, to enhance your workflow logic.