cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Patch a date from a label

Hello,

 

I have a label in my powerapp which displays a date (Label26).  Is there a way i can use a patch function to get the date value out of that label and store it in a Sharepoint list in the 'LastDate' column?

The Patch function will be triggered with a Button if that makes any difference.

 

Thankyou in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Skilled Sharer
Skilled Sharer

Re: Patch a date from a label

Did you use 'DateValue' instead of 'Value' when trying to update date?

View solution in original post

8 REPLIES 8
Highlighted
Skilled Sharer
Skilled Sharer

Re: Patch a date from a label

 

you can use :

 

Patch(ListName,LookUp(ListName,ID=1),{MasterDate:DateValue(lableDate.Text)})

 

ID=1, is the document ID which u want to update

lableDate is the lable form which date is written like - 30/12/2018

Highlighted
Helper III
Helper III

Re: Patch a date from a label

Thanks for getting back to me.

 

This the current statement I have

Patch(Cars,LookUp(Cars,Callsign=Value(Label27.Text),{LastRota:Value(Label26.Text)}))

 Cars = List name

Label27 holds the number of the vehicle of the record to update (ID).

Label26 holds the date I need to patch into the LastRota column

 

When the button is pressed it is just creating a new blank record in the Cars sharepoint list

 

Any ideas?

Highlighted
Skilled Sharer
Skilled Sharer

Re: Patch a date from a label

Youhave to close your lookup formula with parenthesis .

 

use this :

Patch(Cars,LookUp(Cars,Callsign=Value(Label27.Text)),{LastRota:Value(Label26.Text)})

 

Highlighted
Skilled Sharer
Skilled Sharer

Re: Patch a date from a label

please accept my earlier reply as a solution if it works else let me know if any issues.

Highlighted
Helper III
Helper III

Re: Patch a date from a label

Hi,


I have tried this and now the Patch command doesn't apepar to be doing anything.  It has not updated the record I wanted and It hasn't created a blank record in my sharepoint list, i'm not sure what it has done.

Highlighted
Helper III
Helper III

Re: Patch a date from a label

It is not showing any errors either

Highlighted
Skilled Sharer
Skilled Sharer

Re: Patch a date from a label

Did you use 'DateValue' instead of 'Value' when trying to update date?

View solution in original post

Highlighted
Helper III
Helper III

Re: Patch a date from a label

Ive been stuck with this for sooo long.  Thankyou so much works like a charm now

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,350)