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

triggerBody()?['DisplayName']) ?

Hi

 

I create 2 folders in flow with the following expression

 

concat('/Site/',utcNow('dd-MM-yyyy'),'/',triggerBody()?['From'])

 

Is it possible to change the ['From'] which is creating a folder called EmailAddress to DisplayName instead? This particular SharePoint site will be shared with a partner but I dont want them seeing personal email addresses

 

I thought this would work from reading another post

concat('/Site/',utcNow('dd-MM-yyyy'),'/',triggerBody()?['DisplayName'])

 

But that part of the expression is skipped.

 

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
v-yamao-msft
Community Support
Community Support

Hi @GiZmO ,

 

To get the DisplayName, you need another action Get user profile (V2). Then replace the dynamic content “From” with “DisplayName” from the action Get user profile (V2).

 

Function used in the Compose action is:

concat('/Library11/',utcNow('yyyy-MM-dd'),'/',body('Get_user_profile_(V2)')?['displayName'])

 

An image for your reference:

1.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
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

2 REPLIES 2
Brad_Groux
Super User II
Super User II

Please review the Reference for trigger and action types in Workflow Definition Language for Azure Logic Apps and the Functions reference documentation.  

triggerBody() returns literally the body of the action that initiated the logic app (behind the scenes those triggers will be an web request, with headers, and body). Please review the Flow Syntax for SharePoint Columns (blog post) which will hopefully shed some light on what syntax you can use with triggerbody()

If you could provide an expanded screenshot of your Flow and steps, and of any detailed error messages you're receiving we could likely better assist you.

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

v-yamao-msft
Community Support
Community Support

Hi @GiZmO ,

 

To get the DisplayName, you need another action Get user profile (V2). Then replace the dynamic content “From” with “DisplayName” from the action Get user profile (V2).

 

Function used in the Compose action is:

concat('/Library11/',utcNow('yyyy-MM-dd'),'/',body('Get_user_profile_(V2)')?['displayName'])

 

An image for your reference:

1.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
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

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

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!

Users online (41,059)