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 / Patch details of an ed...
Power Apps
Answered

Patch details of an edit form

(0) ShareShare
ReportReport
Posted on by 102
Hi community members,

I am trying to patch the details entered in an edit form along with some controls value outside the form. I cannot use submit form for outside controls. After looking through various solutions and articles, i got to know that this will be solved through Patch function.

Can anyone help me writing the formula? I have an edit form with columns: EmployeeName, EmployeeNumber etc. a total of 7 attributes and i am doing some calculation on outside control based on values entered in edit form. Please help me to complete my formula. Thanks in advance.
Categories:
I have the same question (0)
  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Kpreeti1256 

     

    You can try out the below expression:
     
    Incase you want to edit already exisiting entry:
    Patch(DataSourceName, Lookup(DataSource,EmployeeName= DataCardValue1.Text),{EmployeeNumber: DataCardValue2.Text,EmployeeMobile:DataCardValue3.Text,CalculatedColumn = Label12.Text})
     
    If you want to create a new record:
    Patch(DataSourceName,Defaults(DataSource),{EmployeeName= DataCardValue1.Text,EmployeeNumber: DataCardValue2.Text,EmployeeMobile:DataCardValue3.Text,CalculatedColumn = Label12.Text})
     
    Please replace DataSourceName and all the attributes in the formula as per your actual controls/arguments name. You can add as many attributes between the crly brackets separated by a comma.
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Kpreeti1256 ,

    Could you describe more clearly about the calculation on outside control based on values entered in edit form?

    Waht's more, what value do you want to use, the data in textinput, the data that you select in drop down, etc?

    If the form has not been submitted, you could use the value entered in the form by using:

    Value(DataCardValue1.Text)           (textinput)

    Value(DataCardValue1.Selected.fieldname)       (drop down)

    DataCardValue1 is the control name.

    If the form has been submitted and you want to use the value entered in the form.

    Data will be invalid after the form being submitted.

    So you need to save the data as variable before the form being submitted.

    Try this formula:

    Set(a,Value(DataCardValue1.Text));SubmitForm(Form1)

    Then, you could use the variable a directly.

     

     

    Best regards,

    Community Support Team _ Phoebe Liu

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard