cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tejasvi_munge
Post Partisan
Post Partisan

Invalid argument type

Hi All,

I am creating app in offline mode. on App OnStartI have below code-
If(
!IsEmpty(JourneyColletion.cre08_name) && Connection.Connected && JourneyColletion.cre08_journeyenddateandtime<>Date(9999,09,09)+Time(00,00,00),
do this.....)
here I am having error in this- JourneyColletion.cre08_journeyenddateandtime<>Date(9999,09,09)+Time(00,00,00) as "Invalid argument type" 

I want to insert data when I am online and have some data and journey end date should not be equal to "9/9/9999 12:00 AM"

Any help is appreciated

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

Hi @Tejasvi_munge ,

 

JourneyColletion.cre08_journeyenddateandtime means a single column table, but 'Date(9999,09,09)+Time(00,00,00)' mean a Date Time Value, so they are incompatible types.

If you want to check there is no date time value in journeyenddateandtime column equal to "9/9/9999 12:00 AM", please modify the code as follows.

If(
!IsEmpty(JourneyColletion.cre08_name) && Connection.Connected && Not((Date(9999,09,09)+Time(00,00,00)) in JourneyColletion.cre08_journeyenddateandtime),
do this.....)

Hope this helps.
Sik 

View solution in original post

1 REPLY 1
v-siky-msft
Community Support
Community Support

Hi @Tejasvi_munge ,

 

JourneyColletion.cre08_journeyenddateandtime means a single column table, but 'Date(9999,09,09)+Time(00,00,00)' mean a Date Time Value, so they are incompatible types.

If you want to check there is no date time value in journeyenddateandtime column equal to "9/9/9999 12:00 AM", please modify the code as follows.

If(
!IsEmpty(JourneyColletion.cre08_name) && Connection.Connected && Not((Date(9999,09,09)+Time(00,00,00)) in JourneyColletion.cre08_journeyenddateandtime),
do this.....)

Hope this helps.
Sik 

View solution in original post

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

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,468)