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 function error
Power Apps
Answered

Patch function error

(0) ShareShare
ReportReport
Posted on by 5

Please Help

My patch showing error. i can't find out the reason.

My data base is MS SQL.

 

masumbillah_0-1699273528853.png

Formula:

Patch(
'Cost$',
Defaults('Cost$'),
{
Name: Nam.Text,Date: DatePicker1.SelectedDate, Cost_Type:TYpe, Cost_Description:DesCrip.Selected.Value,Cost:taka.Text,Remarks:remar.Text
}
)

 

Data Base Table:

SELECT [Name]
,[Date]
,[Cost_Type]
,[Cost_Description]
,[Rate]
,[Cost]
,[Remarks]
,[SLNo]
FROM [Family].[dbo].[Cost$]

 

 

Categories:
I have the same question (0)
  • Rajkumar_M Profile Picture
    3,747 Moderator on at

    Hi @masumbillah 

     

    If TYpe is combo box control so you should use

     

    Cost_Type:TYpe.Selected.Value

     

    Refer this link: How to Patch Power Apps Combo Box - Enjoy SharePoint

     

    Thanks!

     

    If my response has been helpful in resolving your issue, I kindly request that you consider clicking "Accept as solution" and "giving it a thumbs up" as a token of appreciation.

     

     

  • Verified answer
    M_Ali_SZ365 Profile Picture
    1,110 on at

    Hi @masumbillah 

    Try This 

    Patch(
     'Cost$',
     Defaults('Cost$'),
     {
     Name: Nam.Text,
     Date: DatePicker1.SelectedDate,
     Cost_Type: TYpe.Selected.Value, // Assuming 'Type' is a Dropdown or similar control
     Cost_Description: DesCrip.Selected.Value,
     Cost: Value(taka.Text), // Converts text to number
     Remarks: remar.Text
     }
    )

    Please accept this solution if it resolves the issue.
    Best regards,
    Muhammad Ali

  • masumbillah Profile Picture
    5 on at

    Can you guide me to use the formula in patch function 

    "NewForm(EditForm1);Navigate(EditScreen1, ScreenTransition.None)"?

     

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 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard