cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dargue
Frequent Visitor

Strange behaviour with two Compose steps

Hi, 

 

I have a flow that is extracting data from a SharePoint list. In the list there are two columns of type People: Reviewer and Reviewee.

 

I want to use the firstnames of the people in my flow, so I am using two Compose steps to extract the firstnames from DisplayNames with the following syntax:

 

@last(split(item()?['Reviewer']?['DisplayName'],' '))

 

This works perfectly well for the first column but fails for the second column. It doesn't matter which order I sequence the columns, the second one always returns the code as a string rather than the result. I am using variables to hold the outputs of the Compose steps.

 

Any ideas?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
v-micsh-msft
Community Support
Community Support

Hi @dargue,

 

For different column, you need change the formula based on the column name, for example, for Reviewer, the formula below works:

 
"@last(split(item()?['Reviewer']?['DisplayName'],' '))"

But for Reviewee, it should be the formula below:

 
"@last(split(item()?['Reviewee']?['DisplayName'],' '))"

Also note that when add a new compose, add the double quotes with the formula.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-micsh-msft
Community Support
Community Support

Hi @dargue,

 

For different column, you need change the formula based on the column name, for example, for Reviewer, the formula below works:

 
"@last(split(item()?['Reviewer']?['DisplayName'],' '))"

But for Reviewee, it should be the formula below:

 
"@last(split(item()?['Reviewee']?['DisplayName'],' '))"

Also note that when add a new compose, add the double quotes with the formula.

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

 

 

Your suggestion fixed the problem, but I still think the behaviour is strange...

 

 

 

 

 

Hi,

 

I have a file name in the following format:

 

000000000 - 00/00/0000 - XXXXX.pdf

 

I want to extract the first set of numbers 000000000 and then the second set 00/00/0000 (basically a date) and then the third set which is a name to the end of the string before the .pdf. Then save each seperate string to a sharepoint list into seperate colums. 

 

The date part of the string when saved to the list should be saved into a format that allows me to set up another flow to check if the date is six months before the date of an event.

 

Any help with the strings would be apreicated.

 

Andrew

 

 

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (49,169)