Power Automate Functions - STARTS WITH or ENDS WITH Function

Power Automate Functions - STARTS WITH or ENDS WITH Function


STARTS WITH OR ENDS WITH Function

What is STARTS WITH OR ENDS WITH function?

STARTS WITH function used to check whether this string starts with a given specific string or not. It will return true or false on the behalf of function.

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 - STARTS WITH or ENDS WITH Function

Navigate to Flows:
Power Automate Functions - STARTS WITH or ENDS WITH Function

Click on the ‘New Flow’ button:
Power Automate Functions - STARTS WITH or ENDS WITH Function
After clicking new flow, select ‘Instant Cloud flow’ from the dropdown:
Power Automate Functions - STARTS WITH or ENDS WITH 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 - STARTS WITH or ENDS WITH 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: JOY ROOT
Power Automate Functions - STARTS WITH or ENDS WITH Function

CODE:
startsWith(variables('NAME'), 'JOY')
OUTPUT:
STARTS WITH FUNCTION returns true because the string is starting with ‘joy’
Power Automate Functions - STARTS WITH or ENDS WITH Function

2# ADD ANOTEHR COMPOSE ACTION
Add another compose action for ENDS WITH function
INPUT:
endsWith(variables('NAME'), 'CUTTING')
Power Automate Functions - STARTS WITH or ENDS WITH Function

OUTPUT:
ENDS WITH FUNCTION return false because there are no ‘CUTTING’ words in a given string
Power Automate Functions - STARTS WITH or ENDS WITH Function


0 Comments

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