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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard