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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Use custom inputs to w...
Power Apps
Unanswered

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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard