Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
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. 

  • DragosNae Profile Picture
    12 on at
    Re: Is there a way to write an output of a Compose into a certain field IF the output fulfills a condition?

    Worked like a charm, thank you very much!

  • Verified answer
    David- Profile Picture
    1,254 on at
    Re: Is there a way to write an output of a Compose into a certain field IF the output fulfills a condition?

    You can use an expression similar to this: 

     

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

     

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow