Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ca-traveler
Regular Visitor

Need Help With Power Automate Expression

Hi All,

 

Need some help converting dynamic content to an expression. The dynamic content I have is "add name to inquiry" then I have a yes or no choice. So when I click on Yes it shows True and No it show False. I would like it to show the person name instead of True and Annonymous instead of False. Can someone please help me out with the Expression? 

 

Thanks in advance!

 

Trent 

3 REPLIES 3
Expiscornovus
Resolver II
Resolver II

Hi @ca-traveler,

 

It looks like SharePoint is the source because there is a SharePoint icon next to the Add name to the inquiry field in the screenshot.

 

Like @christinepayton I assume you want to use the author of the SharePoint item.

 

Can you try an expression like below

if(equals(triggerOutputs()?['body/AddNameToInquiry'],true), 

triggerOutputs()?['body/Author/Email'], 'Anonymous')

ca-traveler
Regular Visitor

Hi All,

 

Adding to my email to see if someone can help me out! 

<![if !vml]>

catraveler_0-1706887057070.jpeg

 

<![endif]>

I am trying to take my dynamic content and add an IF expression so when selected it will display a Persons Name instead of True and "Anonymous" instead of false. I tried the expression below but no joy!

 

Can someone please let me know where I am going wrong in the expression? Thanks in advance!

 

if(triggerOutputs()?['body/AddNameToInquiry'],true))

You would probably have more luck with this on the Power Automate community forum. But what is the issue exactly? Is your condition check not evaluating to true when the value is true? Or you don't know how to conditionally select something?

 

I would put the field into a condition action, check if it is equal to true, and have the yes/no branch do a "set string variable" action where it sets it to one thing or the other depending on what you want.

 

For the person's name, you mean like the person who created the item? If your source is SP, there should be a card in there for the created-by user's display name if that's what you're looking for. You can stick that in the set variable action.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors