cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thomaspp
Helper I
Helper I

Patch function not working properly on Phone.

Hi all,

 

I've created a time registration function that allows the user to register the time with one push of a button.

The OnSelect property is set to:

Patch(
    TimeData,
    LookUp(
        TimeData,
        Day = DataCardValue35_1.Text And Line = "Blister" And BatchNo = DataCardValue29_1.Text
    ),
    {PrepOperStart: DateTimeValue(Text(Now(), "yyyy mm dd hh:mm"))}
)

This works well on the desktop! But not on the iPhone..?!
Sometimes it appears as if it's executing the function but nothing gets patched to the data source. The data source is a Sharepoint List.

 

However I also created a manual input option where the user can register the datetime to the same field using a standard EditForm control instead. It works on both desktop and iPhone!

What could be the cause for this issue with Patch()?

 

Best regards,

1 ACCEPTED SOLUTION

Accepted Solutions
thomaspp
Helper I
Helper I

Sorry, I found the answer after a couple if hours of trial and error.'

Apparent iOS doesn't recognize this time format 

DateTimeValue(Text(Now(), "yyyy mm dd hh:mm"))

so I changed it to "Now()"...
Shows you the importance of testing on various devices.

View solution in original post

2 REPLIES 2
thomaspp
Helper I
Helper I

Sorry, I found the answer after a couple if hours of trial and error.'

Apparent iOS doesn't recognize this time format 

DateTimeValue(Text(Now(), "yyyy mm dd hh:mm"))

so I changed it to "Now()"...
Shows you the importance of testing on various devices.

v-chenzhi
Community Support
Community Support

Hi @thomaspp ,

 

Thanks for sharing!

I haven't considered the limitations of iOS before. I tried this and it worked.

DateTimeValue(Text(Now(), "yyyy/mm/dd hh:mm"))

I need to know more about this restriction, please mark your post as a solution so help others find it more readily.

Thanks again for sharing!

 

 

Best Regards,

Zhi Chen

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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