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 Platform Community / Forums / Power Apps / Using Patch Formula
Power Apps
Unanswered

Using Patch Formula

(0) ShareShare
ReportReport
Posted on by 104

Hello,

     I am new to this, and I would like to use the Patch formula to save data inserted into the shown Text Inputs.

I used the below formula, but I am facing an issue with the column types (Person or Group and Number )

 

Patch('Emp.Resign-List', Defaults( 'Emp.Resign-List' ),
{RequiredStatus:Dropdown3.Selected.Value,
HITSID:HITSIDinput.Text, Name:NAMEinput.Text, Campaign_x002f_Dept_x002e_:CAMPAIGNinput, AccountMgr_x002e__x002f_Head:MGRinput.Text})

 

kasfour_0-1654632807894.png

 

Categories:
I have the same question (0)
  • oappdev Profile Picture
    901 on at

    Hello @kasfour 

    Try the following formula to patch (Person or Group and Number)

    Number column:

    {Campaign_x002f_Dept_x002e_:Value(Campaign_Number.Text)}


    Person or Group:

    { 
    '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser", 
    DisplayName:User().FullName, 
    Claims:"i:0#.f|membership|" & Lower(User().Email), 
    Department:"", 
    Email:User().Email, 
    JobTitle:"", 
    Picture:"" 
    }

     

    Let me know if that helps.

     

  • kasfour Profile Picture
    104 on at

    I dont get the Person or Group part. Where should I add the AccountMgr_x002e__x002f_Head:MGRinput.Text, part to locate where the data would be saved in the ShP list?

     

     

  • oappdev Profile Picture
    901 on at

    Let's resolve one thing at a time. Is AccountMgr_x002e__x002f_Head:MGRinput.Text a number column? Also, can you post your Patch formula?

  • kasfour Profile Picture
    104 on at

    Formula is :

    Patch('Emp.Resign-List', Defaults( 'Emp.Resign-List' ),
    {RequiredStatus:Dropdown3.Selected.Value,
    HITSID:HITSIDinput.Text, Name:NAMEinput.Text, Campaign_x002f_Dept_x002e_:CAMPAIGNinput, AccountMgr_x002e__x002f_Head:MGRinput.Text})

     

    Where

    RequiredStatus: is a dropdown

    HITSID: is a Number

    Name: is a Text

    Campaign_x002f_Dept_x002e: is a text

    AccountMgr_x002e__x002f_Head: is a Person or Group

     

    What I am trying to do is have an empty table (same as on the ShP list) for users to add the data on, and after clicking on Save Button, this data gets saved on the List.

     

    Thank you for your help.

  • oappdev Profile Picture
    901 on at

    You're very welcome.

     

    Okay, try the following Patch Formula. Let me know if it patches the (HITSID) number column for you. Working on the Person or Group column for you next.

     

     

    Patch (
     'Emp.Resign-List',
     Defaults('Emp.Resign-List),
     {RequiredStatus:Dropdown3.Selected.Value},
     {ITSID:Value(HITSIDinput.Text)},
     {Name:NAMEinput.Text},
     {Campaign_x002f_Dept_x002e_:CAMPAIGNinput},
    )

     

     

  • kasfour Profile Picture
    104 on at

    I tried the mentioned formula and this error appeared.

    kasfour_0-1654647898766.png

     

  • oappdev Profile Picture
    901 on at

    I see what is wrong. Try this formula. My fault. 

    Patch (
     'Emp.Resign-List',
     Defaults('Emp.Resign-List),
     {RequiredStatus:Dropdown3.Selected.Value},
     {ITSID:Value(HITSIDinput.Text)},
     {Name:NAMEinput.Text},
     {Campaign_x002f_Dept_x002e_:CAMPAIGNinput}
    )

     

  • kasfour Profile Picture
    104 on at

    I dont get whats the last comma for?. I tried it and this is the error now.

    Thank you so much for your patience here

    kasfour_1-1654649490651.png

     

  • kasfour Profile Picture
    104 on at

    I even tried this one:

    kasfour_0-1654650908249.png

     

  • oappdev Profile Picture
    901 on at

    No worries 😀. We will get this working.

     

    Let's try a simple approach. If it works then you can add the rest of the columns to the formula. 

    Patch (
     'Emp.Resign-List',
     Defaults('Emp.Resign-List'),
     {RequiredStatus:Dropdown3.Selected.Value}
    )

     

    Keep me posted.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 638

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard