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 / Use custom inputs to w...
Power Apps
Answered

Use custom inputs to write data to sql table

(0) ShareShare
ReportReport
Posted on by 35

I am working to create an app that utilizes only manual inputs, meaning all of the controls will be textbox, dropdowns radio buttons etc, and I want to be able to take and write that data to multiple SQL tables. Can anyone advise on how to do this? I am familiar with creating apps based on existing data and using edit forms. How can I create a similar process to write this data?

 

Some examples

Job Status - Active, Closed, Inprogress

Job Number - AB-00001 (all jobs need to start with AB, ideally automatically)

Client Name 

etc.

Categories:
I have the same question (0)
  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @accorti ,

    Do you want to use multiple controls to update rather then using a form?

    Well, if so, you just need to use Patch function.

    Could you tell me the fields' data type that you want to update?

    I assume that all of them are char type.

    I've made a similar test for your reference:

    1)insert a drop down, two textinputs

    set the drop down's Items: 

    ["Active", "Closed", "Inprogress"]

    set the textinput1's Default: 

    "AB-"

    2)set the update button's OnSelect:

    If(StartsWith(Textinput1.Text,"AB-"),
     Patch(table,Defaults(table),
     {Job Status:drop down1.Selected.Value,Job Number :Textinput1.Text,Client Name :Textinput2.Text}
     ),
    Notify("Job Number should starts with "AB-"",NotificationType.Warning)
     )

    Please note that your sql table should have primary key, or else you can not update it in PowerApps.

     

     

     

    Best regards,

  • accorti Profile Picture
    35 on at

    @v-yutliu-msft  Thank you for your response! I am not opposed to using a form and I think I will look into just using the SQL table architecture to create a form for populating those tables. 

     

     

     

    The solution you provided also sounds like the right outcome I am looking for. Can you elaborate a bit more on the use of the patch function? I need to write data to an Azure SQL db. Within the patch function, I assume I would specify the server name in the first argument, but how would I authenticate within that function?

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 839

#2
Valantis Profile Picture

Valantis 533

#3
Haque Profile Picture

Haque 412

Last 30 days Overall leaderboard