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 Apps / Formula-level error us...
Power Apps
Unanswered

Formula-level error usage not fixing date picker null blank() value submission

(0) ShareShare
ReportReport
Posted on by 9

Hi all.  I've researched and debugged this several times, and I am not seeing a fix to handle the submission of a null value from a date picker control, submitted to a work flow with the run method that uses ask in PowerApps.  The closest solution I saw was to turn on formula-level error management and that unfortunately hasn't worked.

 

Here is the background.  I am using this technique based on the video link below, to pass arguments in the .Run method of the flow from the controls on the form behind an onSelect event of a submit button.  The flow inserts a document into the library and updates some meta data columns using the Update File Properties and requests to Ask in Power Apps (see 18:45, and 22:50 of the video)

https://www.youtube.com/watch?v=C-DU1VYYa_0

 

This works fine but when I use a date picker control I have problems.  I can submit the arguments to the flow from the date picker without issue if there is a value like so:  'myFlow'.Run(Text(myDatePickerControlValue.SelectedDate, "yyyy-mm-dd"))

 

Some other notes

 

The column is not required in SP. 

The data control date picker is not set to required either (false)

The InputTextPlaceholder is set to the following:

If(IsBlank(Self.SelectedDate), Text(Blank()))

 

The problem happens since the date filed can be empty (it's not required) and I want to pass blank() that I get an error even with Formula level error management turned on.  I understand this is happening because it is trying to format the value null as a date, or assumes the values passed are a string that can't be formatted as a date and it throws an error.  The error is:

 

: { "error": { "code":

"TriggerInputSchemaMismatch", "message": 

"The input body for trigger 'manual' of type 'Request' did not match its schema definition.  Error details: 'String '' does not validate against format 'date'.'.''}}

 

Now I understand why this is happening, but I figured turning the setting for error level management would fix this.  Here is another video and some other links that talk about this problem

 

writing null values to database

https://powerapps.microsoft.com/en-us/blog/new-feature-error-handling-and-writing-null-values-to-databases/

Writing null to SP with date picker

https://www.youtube.com/watch?v=QPARYHl0THc

 

 

The code I have for the argument in the .run method to call the flow throws this error when there is no value in the datepicker control:

 

'myflow'.Run(

If(IsBlank(MyDataCardValueDate.SelectedDate), Text(Blank()), Text(MyDataCardValueDate.SelectedDate, "yyyy-mm-dd"))

)

 

I have tried replacing Text(Blank()) with just Blank() or "", but I still can't get past the error to make the flow run.

 

Not sure what I have to pass, or if I have to use some other method to get the flow to accept the AskInPower Apps going if there is no value. 

 

Strangely.. when I test the flow manually it shows all the date controls with a red star as required???  Which makes me wonder why this is happening???

 

Any insight to an explanation and a fix would be great.

 

Thanks for your help.

 

Categories:
I have the same question (0)

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard