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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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 III
Resolver III

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.