web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : +OhOglnHKkojtpE6zLdR3a
Power Apps - Building Power Apps
Answered

Patch a date from a label

Like (0) ShareShare
ReportReport
Posted on 6 Feb 2019 09:50:22 by 206

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

I have the same question (0)
  • panand99 Profile Picture
    641 on 06 Feb 2019 at 10:49:23
    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

  • Station1901 Profile Picture
    206 on 06 Feb 2019 at 11:32:31
    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?

  • panand99 Profile Picture
    641 on 06 Feb 2019 at 11:38:14
    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)})

     

  • panand99 Profile Picture
    641 on 06 Feb 2019 at 12:02:27
    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.

  • Station1901 Profile Picture
    206 on 06 Feb 2019 at 12:20:32
    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.

  • Station1901 Profile Picture
    206 on 06 Feb 2019 at 12:20:54
    Re: Patch a date from a label

    It is not showing any errors either

  • Verified answer
    panand99 Profile Picture
    641 on 06 Feb 2019 at 12:23:47
    Re: Patch a date from a label

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

  • Station1901 Profile Picture
    206 on 06 Feb 2019 at 12:35:55
    Re: Patch a date from a label

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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 629 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 397 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 232 Moderator

Last 30 days Overall leaderboard