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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Patch Function

(0) ShareShare
ReportReport
Posted on by 431

Hi Team, 

I have coded my Patch function. See Image 1 however the fields are not appearing on my SP list? See Image 2

However, toggle value is showing a 'tick' - was hoping this would be a Yes or No

 

Patch1.PNGPatch2.PNG

 

Categories:
  • AJ_Z Profile Picture
    3,711 Super User 2024 Season 1 on at

    Are you trying to edit or add new rows.

     

    If it is to add new rows I would have expected the patch to look more like this:

    Patch(SWR_Training,
    Defaults(SWR_Training),
    {Title:Dropdown4.SelectedText.Result,
    Surname: Dropdown2.Selected.Result,
    BaseSite: Dropdown1.SelectedText.Value,
    Region: Dropdown4.Selected.Result,
    SWR1:Toggle1.Value,
    SWR2:Toggle1_1.Value,
    SWR3:Toggle1_2.Value,
    SWR4:Toggle1_3.Value,
    }
    );
    
    Navigate(AttachRecords)

     

    if it is to edit a record it would be something like this:

     

    Patch(SWR_Training,
    /*INSERTRECORDHERE this might typically be a lookup or a selected record reference elsewhere*/,
    {Title:Dropdown4.SelectedText.Result,
    Surname: Dropdown2.Selected.Result,
    BaseSite: Dropdown1.SelectedText.Value,
    Region: Dropdown4.Selected.Result,
    SWR1:Toggle1.Value,
    SWR2:Toggle1_1.Value,
    SWR3:Toggle1_2.Value,
    SWR4:Toggle1_3.Value,
    }
    );
    
    Navigate(AttachRecords)

     

    Please replace this:

    /*INSERTRECORDHERE this might typically be a lookup or a selected record reference elsewhere*/

    with the record for editing

     

    also SelectedText is deprecated so where you write: Dropdown4.SelectedText.Result

    it should be Dropdown4.Selected.Result or Dropdown4.Selected.Value it may even be something else depending on the source so see the options after Dropdown4.Selected. and select accordingly. Usually by default it is Result or Value or the ColumnName it has been changed to.

  • JerryH Profile Picture
    431 on at

    Thanks for helping.

    1. I'm trying to add rows

    1. Fields are still not patching.

    2. Toggle is patching as a tick, not a 'Yes'

     

    Patch3.PNG

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @JerryH 

    You should consider removing the SelectedText references in your formula.  That property has been deprecated and should be avoided.

     

    To first test where the problem comes from, make a manual change to your formula such as:

    Patch(SWR_Training,
     {Title: "TitleHere",
     Surname: "SurNameHere",
     BaseSite: "BaseSiteHere",
     Region: "RegionHere",
     SWR1:Toggle1.Value,
     SWR2:Toggle1_1.Value,
     SWR3:Toggle1_2.Value,
     SWR4:Toggle1_3.Value,
     }
    )

    Perform this action and look at your list to see if the values specified appear.

     

    The Yes/No columns are fine.  SharePoint shows check marks in place of Yes in Yes/No columns...this is purely a SharePoint view thing.

     

    I hope this is helpful for you.

  • JerryH Profile Picture
    431 on at

    Unfortunately still not appearing on my SP List.

     

    Patch(SWR_Training,
    {Title: Dropdown4.Selected.Result,
    Surname: Dropdown2.Selected.Result,
    BaseSite: Dropdown1.Selected.BaseSite,
    SWR1: Toggle1.Value,
    SWR2: Toggle1_1.Value,
    SWR3: Toggle1_2.Value,
    SWR4: Toggle1_3.Value
    }
    )

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @JerryH 

    Did you perform the test?

    Patch(SWR_Training,
     {Title: "TitleHere",
     Surname: "SurNameHere",
     BaseSite: "BaseSiteHere",
     Region: "RegionHere",
     SWR1:Toggle1.Value,
     SWR2:Toggle1_1.Value,
     SWR3:Toggle1_2.Value,
     SWR4:Toggle1_3.Value,
     }
    )

     

    If so, and that did not work, then what are all of the types of your columns?

  • JerryH Profile Picture
    431 on at

    Hi

    Yes i tested it. SP does not display the fields.

    Columns in SP are Single line of text

     Capture22.PNG

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @JerryH 

    So, since that formula should be working, you'll need to look a little deeper at what is going on behind the scenes.

    Open the monitor tool and then perform the formula (with the hard-coded value test) and see what the request is and what the server response is.

  • JerryH Profile Picture
    431 on at

    Hi R, Pls see image. Thank you for your support.

     

    Capture33.PNG

  • JerryH Profile Picture
    431 on at

    HI R, Just for your information, on a different page in App, i have Attachment Control which contains word Title. Not sure if this would impact on my challenge?

    Capture44.PNG

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 352 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 323

#3
Mohsin Ali Profile Picture

Mohsin Ali 226

Last 30 days Overall leaderboard