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 / Error with 'NULL' Valu...
Power Automate
Unanswered

Error with 'NULL' Value when expecting 'String'

(0) ShareShare
ReportReport
Posted on by 17
Hello All,
 
I'm after some help please, I've built a flow that selects items from a MS List then puts the data into an excel spreadsheet, it works perfectly when all fields have data in the List. However when there are any fields that are blank, it is failing with the below response. In this instance the Delivery Date column is missing a date. 
 
If any fields are blank in the MS List I would like the flow to leave them as blank fields in the Excel spreadsheet. 
 
Any help would be much appreciated!!
 
Many thanks 
Katie 
 
 
 
Categories:
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    12,966 Super User 2025 Season 2 on at
    Update all of your values to use a coalesce expression. This way, if a value is null (as noted in the error) the coalesce expression will handle it so it does not error. You can learn about this expression at Blank, Coalesce, IsBlank, and IsEmpty functions - Power Platform | Microsoft Learn.
  • KE-11101624-0 Profile Picture
    17 on at
    Hi David,
     
    Thank you for your response, I'm very new to Power Automate and still struggling how to overcome this issue, would you mind further explaining 
     
    Thands
     
    Katie 
  • David_MA Profile Picture
    12,966 Super User 2025 Season 2 on at
    To help further, you'll need to show your workflow and specifically the configuration of the action that is failing. 
  • KE-11101624-0 Profile Picture
    17 on at
    Hi David
     
     
    If there is no date in the MS List for column Delivery Date for any of the line items. (field_11)
    The field_11 in the outputs at the 'Get Items' stage is missing and subsequently missing at the Select stage raw inputs, where the flow fails.
     
     
  • Suggested answer
    David_MA Profile Picture
    12,966 Super User 2025 Season 2 on at
    Are you having trouble with the coalesce expression? In your select, you just need to convert the current expression you have in the Select action for the Delivery Date to use coalesce. The first part will be your current expression, and the second part will be what you want to return of the value is null, which could be '' to return nothing.
     
    This is the expression above using the modified date: coalesce(formatDateTime(item()?['Modified'],'yyyy-MM-dd'),'')
  • KE-11101624-0 Profile Picture
    17 on at
    Hi David,
     
    I've update the Delivery Date within the select to below expression. However I'm still getting the same error.
     
     
    coalesce(formatDateTime(item()?['field_11'],'dd-MM-yyyy HH:mm'),'')
     
     
  • Verified answer
    David_MA Profile Picture
    12,966 Super User 2025 Season 2 on at
    Try this expression instead:

    if(empty(item()?['field_11']), 'Date Not Set', formatDateTime(item()?['field_11'], 'dd-MM-yyyy HH:mm'))

    I haven't tested this, so hopefully I don't have a comma in the wrong place. But, it first checks if your field is empty. If it is, it sets the value as "Date Not Set", which you could use '' if you don't want to return anything, and if the date is not empty, it formats the date in your preferred format.
  • Verified answer
    KE-11101624-0 Profile Picture
    17 on at
    Hi David,

    I managed to sort the issue out with the below expression:

    if(empty(item()?['field_11']), '', formatDateTime(item()?['field_11'], 'dd-MM-yyyy HH:mm'))

    Thank you for your help :)

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard