Power Automate Functions - TRIM Function

Power Automate Functions - TRIM Function


TRIM Function

What is TRIM function?

TRIM function issued to remove extra space. For example, there are spaces before and after the name Smith. The trim function is used to remove these types of extra spaces

Name = ‘ Smith ‘

Description:

In this guide, we will discuss how to use the float function in power automation. Let us create a new flow. To create a new flow follow the following instructions:

Go to power Apps:

Power Automate Functions - TRIM Function

Navigate to Flows:
Power Automate Functions - TRIM Function

Click on ‘New Flow’ button:
Power Automate Functions - TRIM Function

After clicking new flow, select ‘Instant Cloud flow’ form the dropdown:
Power Automate Functions - TRIM Function

Finally set its name and select ‘manually’ as flow trigger point:
In the below screenshot we set the Name of flow and its trigger point which is ‘Manually trigger a flow. Finally, click on the create button to create a new flow. 
Power Automate Functions - TRIM Function

First, add INITIALIZE VARIABLE ACTION:
To initialize a variable select initialize variable action from the actions set. Then set its properties the same as mentioned in the screenshot.
1# INITIALIZE VARIABLE ACTION
INITIALIZE VARIABLE:
Initialize a variable having the following attributes. 
Name: set variable name
Type: set the type of variable as ‘STRING’
Value: “ SMITH “
Leave empty spaces before and after the name “ SMITH “.

Power Automate Functions - TRIM Function

1#ADD COMPOSE ACTION
Add compose action to call the trim function. I call the trim function and pass variable by its name as given below.
Power Automate Functions - TRIM Function

EXPRESSION:
trim(variables('STRING NAME'))
OUTPUT:
You can see the difference between input and output
Input:
Power Automate Functions - TRIM Function

Output:
Power Automate Functions - TRIM Function


0 Comments

Thanks for commenting. Your comment will be live soon after approval.