Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

How to update information

Posted on by 72

The formula I have below is not working for my date picker column. Can you help me figure out what is incorrect in my formula. Thanks.

 

Patch(
   'Conditioning Tool',
   {
      ID: Gallery2.Selected.ID,
      'PO number': DataCardValue11.Text,
      'Item number': DataCardValue18_6.Text,
      'Case quantity': DataCardValue17_3.Text,
      'Dry matter %': DataCardValue22_3.Text,
      'Average Shore value': DataCardValue21_3.Text,'Conditioning days':DataCardValue22_1.Selected, 'Release Date':DataCardValue26
Categories:
  • DBO_DV Profile Picture
    DBO_DV 4,197 on at
    Re: How to update information

    Hey @ANB ,

     

    I think there was a bug on my side since your post got accepted and 2 hours later I’ve got the notification about the response it still not working.

    As long as it’s working now I’m happy 👍🏻

     

  • ANB Profile Picture
    ANB 6,939 on at
    Re: How to update information

    Hi @DBO_DV , The information that I gave with reference article helped @tchamb2 to resolve the issue hence it was accepted as solution. I hope you have gone through complete thread of the post.

     

    Thanks,

    ANB

  • DBO_DV Profile Picture
    DBO_DV 4,197 on at
    Re: How to update information

    Why did you accept a solution if it does not work? 

    the selected does not come at the end. You need to identify the way how you want to filter the dataset down to one songs record.

     

  • CU06111240-0 Profile Picture
    CU06111240-0 72 on at
    Re: How to update information

    It does not work. Even when I put selected at the end.

  • Verified answer
    ANB Profile Picture
    ANB 6,939 on at
    Re: How to update information

    Hi @tchamb2 Patch syntax is incorrect. Your BaseRecord is missing. Use default to create new record and Lookup to update existing record.

    PatchDataSourceBaseRecordChangeRecord1 [, ChangeRecord2, … ])

    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-patch

     

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    Please click Accept as solution ✅ if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍

    Thanks,
    ANB


  • DBO_DV Profile Picture
    DBO_DV 4,197 on at
    Re: How to update information

    There are a few things

    Patch(
     'Conditioning Tool',
     Defaults('Conditioning Tool')
     {
     ID: Gallery2.Selected.ID,
     'PO number': DataCardValue11.Text,
     'Item number': DataCardValue18_6.Text,
     'Case quantity': DataCardValue17_3.Text,
     'Dry matter %': DataCardValue22_3.Text,
     'Average Shore value': DataCardValue21_3.Text,
     'Conditioning days':DataCardValue22_1.Selected, 
     'Release Date':DataCardValue26})

     missing:

     

    The defaults will create a new record. to Update it you need to Use a LookUp or filter or a Selected Item to be able to say which record will be updated.

     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,297

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,890

Leaderboard