Let’s see how we can use last and first expression in Cloud Flows.
Below is the use case for using the First and Last Expression in the Cloud Flows:
1. To get First & Last item in array variable
2. To get First & Last char of string variable
3. To get First and Last records from the list of records
Let us get started!!!!!
- Let say you have string named “A Datum Integration” and You want to extract the first character from the string, then use below expression.
Syntax – first(<string>)
I have initialized a string “A Datum Integration”.
Add added a compose action and used first expression as below.
As a result, will get a first character from the string i.e A
Output –
2. Similarly, we can use last expression to get last character from the string. In this case character “n” should be output
Syntax – last(<string>)
Output –
Stay tuned for Part II.
One thought on “Last and First expression in Cloud Flows – Part I”