Function Mapping
Updated
Functions
Users can now conveniently apply standard functions directly within FPDI. Previously, users needed to apply functions to their files offline before uploading them to Sprinklr. With the latest enhancement, users can apply functions seamlessly within the FPDI playground and import files directly. This eliminates the need to switch between applications for file editing, streamlining the process for a more efficient workflow.
Functions List
Function name | Description |
Add | Adds selected values together |
Modulus | Returns the remainder after division operation |
Substitute | Substitutes a specified substring with another |
Power | Raises number to power of another |
Subtract | Subtracts selected values from number |
Divide | Divides number by selected values |
Conditional Function | Returns values based on true or false condition |
Floor | Rounds number down to nearest specified multiple |
Absolute Value | Returns absolute value of number |
Ceiling | Rounds number up to nearest specified multiple |
Multiply | Multiplies selected values together |
Concatenate | Combines multiple text strings into one |
Trim | Removes extra spaces from text string |
Upper | Converts text to uppercase |
Lower | Converts text to lowercase |
Proper | Capitalizes first letter of each word in text string |
Date Difference | Calculates difference between two dates |
How to apply functions?
Here is a step by step on how to apply functions on your file-
Click on +Functions in Function Mapping.
Select the column you want to apply the function on (Output Column) in the Column Name dropdown.
In case you want the output in a New Column, click on Create Column in the Column Name dropdown. Enter new Column Name, select the Sprinklr field for mapping and select the data type of the new column.
Once you have selected an output column, select the function you want to apply from the Select Function dropdown.
To add a new function, click on +Function button.
After adding all the functions, click on Apply button in the bottom right to transform the data.
Creating and Importing Functions Template
When frequently uploading similar data files users do not need to apply the functions each time, they upload their files. Users can create and save function templates which can be imported with just two clicks.
To save a Function template, select the Save as Function Template check box once you have applied all required functions. When you click on Save to import the file, the Function Template will be saved.
To use a function template, Click on Import Function Template button on the top right.
Select the Mapping Template you want to import and click on Done.
In case you have selected a Function Template you do not want to use, click on the Trash Bin icon to remove the Function Template, and select the right one.
Actions allowed on Functions:
Editing a Function
Deleting a Function
Rearrange Functions application order
Editing a Function
In case you want to edit a function, hover on the function you want to edit and click on the Edit button.
Deleting a Function
In case you want to delete a function, hover on the function you want to edit and click on the Delete button.
Rearrange Functions
In case you want to rearrange functions, drag, and drop the function card to the position you want.
Important: Function application is order dependent, rearranging functions can change Column values.
Application of frequently used functions
Add
Select Add from the Select Function dropdown
Add operation can be performed with other columns (adding existing column to selected Output Column) or with fixed values (adding a number to selected Output Column). Select Column or Number in Add With field.
If you have selected Column in the dropdown, select the Column you want to add to the Output Column from the With Column dropdown.
If you have selected Number in the dropdown, enter the value you want to add to the Output Column in Enter Value field.
To perform another, add operation click on Add Field and repeat Step 3/ Step 4.
To remove a field not being used, click on Remove Field.
Conditional Function
Using the conditional function, you can modify values in the output column based on conditional statements.
In the Source Column dropdown, select the column you want to apply the condition on. Note: This column will be different than the Output Column.
In the Condition dropdown select the condition you want to apply.
In the Compare dropdown, select if you want to compare the condition to another column (Example Value in column Rating Amazon is greater than value in column Rating Walmart) or to a fixed number/text (Example value in column Rating Amazon is greater than 5).
Based on the above step select the Column/Fixed number you want to compare the Source Column with.
In Value If True field, enter the value you want the cell to have if the Condition selected above holds true.
In Value If False field, enter the value you want the cell to have if the Condition selected above does not hold.
Date Difference
Date Difference function is used to calculate the difference between 2 dates in selected units. Note: This function can only be applied on New Created Columns in FPDI.
Create a new column from the Column Name dropdown.
Select Date Difference function from Select Function dropdown
Select the Start Date column from Select Date Column dropdown.
Date difference can be done with another column containing dates or a specific custom date, select Column or Column Date accordingly in the Difference with dropdown.
In case of date difference between two columns, select Column from End Date dropdown, or select Custom Date from End Date calendar.
Select the desired units from the Units dropdown.