Skip to main content

Notifications

Community site session details

Community site session details

Session Id : yZtZojbpcG/PZUQoEhqQ8w
Power Automate - Building Flows
Answered

If Blank Value

Like (1) ShareShare
ReportReport
Posted on 11 Jul 2024 12:57:17 by 62

Hi,
I'm probably missing something stupidly obvious here...

 

I'm working on a contract automation that pulls data from excel into a word template.

 

The working weeks section if blank should be 52.14 and then if not blank should display the value.

 

I currently have if(empty(item()?['Offer Letter - Working Weeks']),'52.14',int(item()?['Offer Letter - Working Weeks'])) but now every output has 52.14 regardless of the contents.

 

Help please!

  • Verified answer
    Cfis Profile Picture
    62 on 12 Jul 2024 at 15:39:52
    Re: If Blank Value

    I fixed this, for anyone interested the code tweak below worked:

     

    if(empty(item()?['Offer Letter - Working Weeks']), '52.14', string(item()?['Offer Letter - Working Weeks']))
  • Cfis Profile Picture
    62 on 11 Jul 2024 at 14:31:04
    Re: If Blank Value

    Hi,

     

    Thanks for this.

     

    So it's already in Compose at the minute and the 'populate word document' pulls the result from the compose.  Essentially because the spreadsheet comes from an outside source, i'm not able to incorporate a formula to output the value 52.14 if the cell is blank.

     

    i.e. if row 1 shows '11' then input '11', but if row 1 shows null then input '52.14'

  • creativeopinion Profile Picture
    10,389 Super User 2025 Season 1 on 11 Jul 2024 at 14:13:12
    Re: If Blank Value

    @Cfis To troubleshoot your expression, use a Compose action to store the expression that just checks to see whether or not the working weeks section is empty:

    empty(item()?['Offer Letter - Working Weeks'])

    If this expression alone isn't returning the results you are expecting, you'll need to adjust the expression until it outputs the result you are looking for.

     

    Additionally, you can use another Compose action to output this expression:

    int(item()?['Offer Letter - Working Weeks'])

    Check to see if the output of this expression is what you are expecting. To troubleshoot an expression, break it out into separate parts. 

     

    You might find the tutorials linked below helpful:

    7 Functions You Need to Know | ️Expression Essentials: Part 1

     

    In this section, I'll cover how to get dynamic content with an expression when the dynamic content you need isn't listed in the dynamic content menu.

     

    In the full tutorial I cover 7 functions you need to know when getting started with expressions.

    1️⃣ empty()

    2️⃣ coalesce()

    3️⃣ equals()

    4️⃣ if()

    5️⃣ concat()

    6️⃣ length()

    7️⃣ split()

     

    I cover how to use these functions in expressions and I’ll also cover common mistakes when it comes to writing expressions and show you a few tips and tricks along the way.

     

    As a beginner or even an intermediate flow builder—expressions can seem a bit complex at first, I’m going to try to simplify it for you. If you want to level up your flows by writing expressions—keep watching!

     

    IN THIS VIDEO:

     What is an Expression?

     What is a Function?

     What Does Wrapping a Function Mean?

     How Do I Insert an Expression?

     How to Use a Compose action

     How to Navigate the Expression Builder with Arrow Keys

     How to use the Expression Tooltip

     Common Mistakes When Writing Expressions

     How to differentiate a null from an empty string

     How to Get Dynamic Content When it’s Not Listed

     How to Use a Get Item Action to Verify Dynamic Content Output

     How to Convert Strings to Lower Case

     How to Troubleshoot the if() Function

     

    ----

     

    5 Power Automate Troubleshooting FAQs and Helpful Tips for Creating Better Flows

     

    In this Power Automate tutorial, I explore 5 frequently asked questions that pop up when troubleshooting a flow. If you’d like to to level up your Power Automate flow skills and learn how to troubleshoot your Power Automate flow—this tutorial is for you!

     

    IN THIS VIDEO:

     How to troubleshoot a false Condition action result

     How to get dynamic content when it isn’t selectable from the list of dynamic content

     How to troubleshoot an Apply to Each action that isn’t looping through

     How to troubleshoot a skipped Apply to Each action

     How to troubleshoot a Filter Query

     How to use a SharePoint yes/no column in a Filter Query

     How to use Compose actions to troubleshoot a Power Automate flow

     How to troubleshoot multiple emails being sent

     How to troubleshoot multiple Teams messages being sent

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution .
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

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,658 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard
Loading started