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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Expression to pass bla...
Power Automate
Answered

Expression to pass blank and text value from Excel to Sharepoint

(0) ShareShare
ReportReport
Posted on by 115

Hi. Asking for your help on how to modify the expression below. I have a date field in Excel that has a default text value but the parallel column of that field in SharePoint is a date data type column. I want my flow to pass if the date field is blank or did not change the default text value and returns blank in SharePoint. In short, whether the field is blank or did not change the default text value, the flow will return blank if no date was selected in the dropdown of the field in Excel and avoid the error below in Create item action.  The column in SharePoint is set as date data type.

 

third_learner_0-1705563744607.png

Here's the current expression:

if(contains(items('Apply_to_each_2')?['Resources Assigned Date'], '#VALUE!'), 
null, items('Apply_to_each_2')?['Resources Assigned Date'])
 
 
Thank you very much for your help.

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @third_learner ,

     

    Is 'Resources Assigned Date' a date column in excel table? 

    Please check if ISO8601 has been turned on in "List rows in a table" action and modify your expression as follows:

    if(contains(items('Apply_to_each_2')?['Resources Assigned Date'], '#VALUE!'), 
    ' ', items('Apply_to_each_2')?['Resources Assigned Date'])

     

    Best regards,

    Rimmon

  • third_learner Profile Picture
    115 on at

    Hi @v-mengmli-msft 

     

    Yes, the 'Resources Assigned Date' is set as a date column in Excel. ISO 8601 has been turned on also.

     

    I tried your expression above but I got the same error

     

     

    third_learner_0-1705568043070.png

     

    This what it looks like in Excel. 

    third_learner_2-1705568221632.png

     

     

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Please try this:

    if(contains(string(items('Apply_to_each_2')?['Resources Assigned Date']), '#VALUE!'),null,items('Apply_to_each_2')?['Resources Assigned Date'])

     

     

  • third_learner Profile Picture
    115 on at

    Hi @v-mengmli-msft  I used your revised expression above but still got the same error. I just wonder if my column in SharePoint list is set to Date data type, does it accept a text value as an alternative if no date provided in the Excel?

     

    third_learner_0-1705589641329.png

     

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @third_learner ,

     

    First error: The value is not in the string/date format.

    Please check whether the column type is Date type.

    My test column:

    vmengmlimsft_1-1705633125813.png

    Outputs:

    vmengmlimsft_2-1705633227861.png

     

    Second error: The null value cannot be recognized, check whether there is a null value in this column, if so, you need to filter out the rows whose value is not null in this column.

    vmengmlimsft_3-1705633550583.png

     

  • third_learner Profile Picture
    115 on at

    Hi @v-mengmli-msft 

     

    I confirm that the field in Excel is formatted as Date data type. I have this in my Excel column. If there is no selected month and year or if the field is blank from another sheet, the value is #VALUE!

     

    But my flow keeps failing in the Create item action using your expression.

     

    third_learner_0-1705638692520.png

     

     

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Sorry for delay reply.

    I recommend you check outputs of this column as well. You can show outputs to me if you don't know how to deal with it.

  • third_learner Profile Picture
    115 on at

    Hi @v-mengmli-msft 

    This is the output in Compose if the the Date column in Excel is blank.

     

    third_learner_0-1705648569398.png

     

  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    How did you get #VALUE!? Manually or Formula?

    If you are using Formula, what is it?

  • third_learner Profile Picture
    115 on at

    @v-mengmli-msft 

    I get the #VALUE! because I have a formula in Excel. See below.

     

    third_learner_0-1705649477697.png

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 462

#2
Vish WR Profile Picture

Vish WR 256

#3
David_MA Profile Picture

David_MA 242 Super User 2026 Season 1

Last 30 days Overall leaderboard