Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Edit and Create New Records in SQL Database from PowerApps

Hello guys,

I just started learning PowerApps and I simply do not understand how to do the following - even after reading guides and forums about it. So I am hoping here that somebody would be kind enough to use their time to give an answer. 😄

To give the simplified version of it, I created an app of the Lead Details Form in AX 2009 (SMMLEADTABLE). I have the following fields that I want to display, edit and create new record of:





My questions are as follows:

1. When I edit a record (the subject field for example), I get an error saying the following: 

PowerApps Error 3.JPG

The + button and its OnSelect property formula is set to SubmitForm(EditForm1) on the Edit Screen. The user is set to SQL Datawriter, so I should be able to edit and create new records in the SQL database from the PowerApps.

2. SMMLEADTABLE naturally contains those mentioned fields. However, Both the PRIORITY and OWNER ID are reference tables (I don't know the correct term here) which are SMMLEADPRIORITYTABLE and EMPLTABLE. Thus, when editing the Priority from "Low" to "High" in AX 2009, you simply choose from the dropdown list. I have edited the PRIORITY Datacard where I deleted the DataCardValue label control and inserted a dropdown control where the Items property formula is SMMLEADPRIORITYTABLE.PRIORITY. However, it contains numbers (1-4) which are not supposed to be there because the table only contains three records i.e. "LOW", "MID" and "HIGH". I also set the formula on the Update property of the PRIORITY DATACARD to DropDown.Selected.Priority. How do I properly set this kind of situation?

3. LEADID is created automatically in AX 2009 using a number sequence. How do I integrate that functionality in PowerApps so that it will create a unique ID using the number sequence from AX?

4. When I create a new record through PowerApps, I get the following error:

PowerApps Error 2.JPG

The submit button formula is set to SubmitForm(CreateLeadForm).


Thank you for the help in advance!

Community Support
Community Support

Re: Edit and Create New Records in SQL Database from PowerApps

Hi @rollyrulona 


Do you want to the field in one table is comes from the dropdown selected value from another table?

Change as this:




Best Regards.



Frequent Visitor

Re: Edit and Create New Records in SQL Database from PowerApps

Hi @v-yuxima-msft


Thank you for the reply.


No, I want to make the DataCardValue under Priority_DataCard to be a dropdown control itself where I specify the DataCardValue's item property to be "dbo.SMMLEADPRIORITY" data source so that I can simply pick the different priorities from that table to update my SMMLEADTABLE data source priority field.


I hope that makes sense?


Best regards,



Helpful resources


Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!


Community Highlights

Check out whats happening in Power Apps


Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,624)