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 / Don't want to assign i...
Power Automate
Suggested Answer

Don't want to assign if value is null

(1) ShareShare
ReportReport
Posted on by 2
I am writing a flow and in Dataverse action, in one table i have to assign a string value. But i want to assign that value only if it is not null. if it is null then don't assign value.
 
I need expression for that.
 
Can anyone help.
Categories:
I have the same question (0)
  • Suggested answer
    creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at
    You can use the if() function and . The if() function takes three parameters:
    if([boolean value],[true value],[false value])
    If you want to specifically check if the value is not null, you would need to use the not() and equals() function in your expression.
    if(not(equals(dynamicContent, null)), 'String Value Here', '')

    If you want to check if the value is either null or an empty string—use the expression below:

    if(not(empty(dynamicContent)), 'String Value Here', '')

    You might be interested in this YT Tutorial:

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

    Do you find writing expressions hard? Can’t seem to access dynamic content to insert into an expression? Are you super confused when it comes to nesting functions?
    In this Power Automate tutorial I’m going to 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—watch the tutorial!
     
    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
     
     
    Hope this helps!

    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

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard