cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
3ation
Resolver I
Resolver I

New Run Time errors this morning, Inocrect argument Type, Expected a number for Date Cards

Hey guys,

We woke up to this new error in our applications, they always worked fine. The Date Card Update, Seems to want a number now instead of a Date? 

We have the following in the Update property for validation, and this started throwing runtime errors when we edit! 

 

 

If(
DateDiff(
dtInquiryDate.SelectedDate,
Now()
) >= 0,
dtInquiryDate.SelectedDate,
Blank()
)
1 ACCEPTED SOLUTION

Accepted Solutions
3ation
Resolver I
Resolver I

The error keeps coming and going depending on the Authoring Version, But we changed our code to
 
If(    !IsBlank(dtInquiryDate.SelectedDate)  And DateDiff(
                  dtInquiryDate.SelectedDate,
                  Now()
                   ) >= 0,
                  dtInquiryDate.SelectedDate,
                  Blank()
)
 
 
Which is a better test, and more accurate, and the run time error. 
 
I do think the error is a right error from Microsoft, But having it appear and not appear depending on the authoring version is a strange one!.
 
Thanks guys

View solution in original post

9 REPLIES 9
eka24
Super User III
Super User III

Try this:

If(
DateDiff(
dtInquiryDate.SelectedDate,
Now()
>= 0,
dtInquiryDate.SelectedDate,
Value(Blank())
)
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Thanks @eka24 ,

 

Microsoft has just confirmed that this is due to the latest release and they are actively looking into how to fix it... it is not our code... , We do need Blank() As this is how the data card validation will work. 

apparently the latest authoring tool has this issue.

 

ghuerren
Frequent Visitor

you saved my day! Tx for the info

Else you can change version of powerapps studio in Account...Version.png

OMG, didn`t know about the possibility! Tx a lot!

3ation
Resolver I
Resolver I

This seems to have returned with Authoring tool 0.28 again.  Microsoft is still investigating. 

 

3ation
Resolver I
Resolver I

The error keeps coming and going depending on the Authoring Version, But we changed our code to
 
If(    !IsBlank(dtInquiryDate.SelectedDate)  And DateDiff(
                  dtInquiryDate.SelectedDate,
                  Now()
                   ) >= 0,
                  dtInquiryDate.SelectedDate,
                  Blank()
)
 
 
Which is a better test, and more accurate, and the run time error. 
 
I do think the error is a right error from Microsoft, But having it appear and not appear depending on the authoring version is a strange one!.
 
Thanks guys

View solution in original post

ghuerren
Frequent Visitor

Do you guys still face the same problem @3ation @eka24 @GuillaumeGedima 

I do....

Yup, Still there 😞

I think the behavior was changed for this functionality (maybe to the better, but caused all this).

You can't depend on a date = null in the equation, we had to go around and add lots of code to work around this.....etc.

 

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (76,749)