cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sparkymark75
Level: Powered On

Struggling with a couple of issues

Just trying to get the hang of how PowerApps hangs together. I'm building an app which is hooked up to an on-premise SQL database via the gateway. All okay so far.

 

I have created a New record form. I changed one of the fields to use a dropdown box which will show a list of Topics. I want this to show the TopicName to the user but to save the TopicId to the Improvements table in the database. All fairly standard stuff using C#, MVC, etc

 

However I'm struggling to get this working as expected. I can get it to list the items using...

ShowColumns('[dbo].[Topics]', "TopicName", "TopicId")

which works. However I then need to set the Update property of the DataCard so that the TopicId is sent back to the database. However I don't see the Update property listed and can't figure out why or how to get it to show.

 

I'm also having general issues getting the form to save to the database with a Server Response: Resource Not Found error. This could be related to the above? I'm using the Patch function as I was having issues getting the SubmitForm function to work. I think this is to do with me using the uniqueidentifier column type for all my primary keys in the database. Does PowerApps support this data type? Does it cause issues? I've seen reference to it causing problems but those were older articles that may no longer apply.

 

Patch('[dbo].[Improvements]', { ImprovementId: GUID(), CreatedBy: _UserId, CreatedOn: Now(), CurrentState: CurrentState_Value_New, TopicId: TopicId_Value_New.Selected.TopicId, Status: 1, StatusReason: 1 })

 

10 REPLIES 10
Super User
Super User

Re: Struggling with a couple of issues

If you are using a Form you will be changing the Update of the Card on the form...not the actual field.

 

If you are using a form you should have no need to use Patch. 

sparkymark75
Level: Powered On

Re: Struggling with a couple of issues

Form > DataCard > Dropdown.

 

There is no Update property available when I select the DataCard.

 

2020-01-30_16-03-46.png

Super User
Super User

Re: Struggling with a couple of issues

That is not the Card...when you click on it look at the properties to the right side and right above the name it should say CARD. That is how you will know you have it. Then you will see this:

 

Capture10.JPG

Super User
Super User

Re: Struggling with a couple of issues

If you confirm it is in fact a CARD and you do not see an Update as an option on it then you put in a Display Form instead of an Edit Form and you will have delete it and put it back and an Edit Form. I don't know of any way to change from Display to Edit. Changing the DisplayMode does not change this as you may think. 

 

It is better to always insert an Edit Form and then you change the mode to View if you want. Using the Display one...that is all you will ever get out of it. 

sparkymark75
Level: Powered On

Re: Struggling with a couple of issues

Yup, see the image below, no Update option, Card selected...

 

2020-01-30_16-15-52.png

 

I've just spotted item 38 on this page https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/common-issues-and-resolutions 

 

However the workaround doesn't seem to work.

sparkymark75
Level: Powered On

Re: Struggling with a couple of issues

In the properties panel on the right hand side when I have the form selected, it states EDIT at the top so I'm assuming I've already created an Edit form?

Super User
Super User

Re: Struggling with a couple of issues

When you inserted the Form...did you select the Edit or Display from the choices in the dropdown?

sparkymark75
Level: Powered On

Re: Struggling with a couple of issues

Edit

Super User
Super User

Re: Struggling with a couple of issues

Hmm...sorry then...I've never seen that happen. I mostly use SharePoint data sources but I have some that are SQL too and even then. I'm stumped. Best of luck!

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,256)