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- 

  1. Click on +Functions in Function Mapping. 
     

  2. Select the column you want to apply the function on (Output Column) in the Column Name dropdown. 
     

  3. 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. 
     

  4. Once you have selected an output column, select the function you want to apply from the Select Function dropdown. 
     

  5. To add a new function, click on +Function button. 
     

  6. 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.  

  1. 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. 
     

  2. To use a function template, Click on Import Function Template button on the top right. 
     

  3. Select the Mapping Template you want to import and click on Done. 
     

  4. 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: 

  1. Editing a Function 

  2. Deleting a Function 

  3. 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 

  1. Select Add from the Select Function dropdown 

  2. 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. 

  3. If you have selected Column in the dropdown, select the Column you want to add to the Output Column from the With Column dropdown. 
     

  4. If you have selected Number in the dropdown, enter the value you want to add to the Output Column in Enter Value field. 
     

  5. To perform another, add operation click on Add Field and repeat Step 3/ Step 4. 
     

  6. 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.  

  1. 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. 

  2. In the Condition dropdown select the condition you want to apply. 

  3. 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). 

  4. Based on the above step select the Column/Fixed number you want to compare the Source Column with.  

  5. In Value If True field, enter the value you want the cell to have if the Condition selected above holds true. 

  6. 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. 

  1. Create a new column from the Column Name dropdown. 
     

  2. Select Date Difference function from Select Function dropdown 

  3. Select the Start Date column from Select Date Column dropdown. 

  4. 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. 

  5. In case of date difference between two columns, select Column from End Date dropdown, or select Custom Date from End Date calendar. 

  6. Select the desired units from the Units dropdown.