What is the first and last function?
We use it to get the first and last value in the array and string.
It same as the previous (skip function). In this function, we will earn how to get the first and last names from an array. And how to get the first and last letter from a string.
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:
Navigate to Flows:Click on the ‘New Flow’ button:
After clicking new flow, select ‘Instant Cloud flow’ form the dropdown:
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.
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.
Initialize a variable having a type array and set some name as its value.
1# COMPOSE ACTION
FIRST ARRAY FUNCTION:
Fist array function will get the first name from the given array values.
CODE:
first(variables('ARRAY NAME'))
OUTPUT:
2# COMPOSE ACTION
LAST ARRAY FUNCTION:
The last array function is used to get the last value given array values
CODE:
last(variables('ARRAY NAME'))
INPUT:
OUTPUT:
The output of this function will be. The last name in the given array values is MOEEN so it returns us MOEEN
3# COMPOSE ACTION
FIRST STRING FUNCTION:
The first string function is used to get the first letter from the given ‘name’ like the name is SHEHRYARSULTAN it will extract the first letter ‘s’
CODE:
first(variables('STRING NAME'))
INPUT:
OUTPUT:
4# COMPOSE ACTION
LAST STRING FUNCTION:
LAST string function is used to get the LAST letter from given ‘name’ like the name is SHEHRYARSULTAN it will extract first letter ‘N’
CODE:
last(variables('STRING NAME'))
INPUT:
OUTPUT:
0 Comments
Thanks for commenting. Your comment will be live soon after approval.