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 / 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
    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
    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
    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
    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
    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

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