cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
matthewjd24
Frequent Visitor

Form Not Auto-Generating

I'm working on my first Power App and I've got everything working except this last part where someone can create a new record. When I try to generate the form it is not appearing like it does in the tutorials. I do Insert > Forms > Edit, select my data source (a SQL server), add my five fields, and it looks like this. 

matthewjd24_0-1643519963494.png

I don't know where to go with this. Every tutorial I've seen says when I select my fields it should show up like this:

matthewjd24_1-1643520290653.png

It's probably something super simple but my googling has not turned anything up. When I select one of the data cards and select Value, this shows up: 

matthewjd24_2-1643520391360.png

It makes me think something is wrong since, from what I know, it's supposed to be an input field. I messed with every setting for the form but so far no luck. Thanks for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
matthewjd24
Frequent Visitor

I have figured out the solution. My SQL table does not have a primary key, and according to this link it is necessary. https://powerusers.microsoft.com/t5/Building-Power-Apps/Edit-Controls-not-available-in-Edit-Form/td-...

 

Now that I've added a primary key it allows me to create edit fields.

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

That appears to be a form in View Mode. Are you sure you have not selected Insert > Forms > Display ? Check the DefaultMode of the form. Also what is the DataSource and Item of the Form ?

 

 

I appreciate the help. The form is in Edit mode, I've deleted it and recreated it a few times just to be sure. The DataSource is a table in a SQL server. I currently do not have an item set in the form, because (if I'm understanding it right) I want to use the form to create a new row instead of an updating an existing one. 

I've noticed that if I set an item in the form, and set it to View, values for the item show up. Do you think it has to do with this? Maybe there should be an edit option here?

matthewjd24_0-1643525370496.png

 

matthewjd24
Frequent Visitor

I have figured out the solution. My SQL table does not have a primary key, and according to this link it is necessary. https://powerusers.microsoft.com/t5/Building-Power-Apps/Edit-Controls-not-available-in-Edit-Form/td-...

 

Now that I've added a primary key it allows me to create edit fields.

Hi @ ,

A Form needs an Item and a DataSource to show the desired record, so yes, you need to put that in.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (2,491)