web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Is there a way to writ...
Power Automate
Answered

Is there a way to write an output of a Compose into a certain field IF the output fulfills a condition?

(0) ShareShare
ReportReport
Posted on by 12

Hello,

 

I'm trying to use the "dateOfWeek" function to return the day of a timestamp.

I would then like to write a certain value into a specific field, based on the returned day of week.

 

Example:

- timestamp returns 2 (Tuesday) => I want to write myValue ("Duration") into the column "Tue" of the Excel file

- timestamp returns 5 (Friday) => I want to write myValue ("Duration") into column "Fri" of the Excel file

 

I've added a screenshot of the fields.

 

PA.PNG

Any help would be appreciated.

 

Thank you. 

Categories:
I have the same question (0)
  • Verified answer
    David- Profile Picture
    1,254 on at

    You can use an expression similar to this: 

     

    if(equals(dayOfWeek(utcNow()),2),'value if yes''value if no')

     

     

  • CU26081034-4 Profile Picture
    12 on at

    Worked like a charm, thank you very much!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 58

#2
David_MA Profile Picture

David_MA 53 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 36 Most Valuable Professional

Last 30 days Overall leaderboard