Tag Archives: last
Last and First expression in Cloud Flows – Part I
Let see how we can use last and first expression in Cloud Flows. We can use last and first expression get first and last value in array, strings and also we can use first and last expression to get first and last record from list of records in cloud flows Let get started!!!!! Let say you have string named “A Datum Integration” and we want first character of the string, then use below expression. Syntax – first(<string>) I have initialized a string “A Datum Integration”. Add a compose and use first 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.
Last and First Expression in Cloud Flows – Part II
We have already seen how to extract character from string in Cloud flows. Let see how we can get first and last value in array. I have array of list of records (account records), want to get 1st value in array. Array – Add a compose step in flow and use below syntax to get first value. Syntax- first(<array>) Output – Similarly, we can get last value in array. Syntax – last(<array>) Output – Hope this helps !