Canvas App Edit Form not editable option
-
Canvas App Edit Form not editable option
Posted by DSC Communities on November 26, 2021 at 11:51 pm-
JIKEN DUBAL
MemberNovember 26, 2021 at 11:51 PM
Hi,I have created one canvas app which connect to on-premises SQL Server DB. This app is working fine with first table connection for Gallery, Edit form.
My scenario is as below
- Master table with 10 records
- Load data at Gallery at Scrollable screen Screen1 by connecting master table at SQL ServerĀ
- Selected record for edit in second screen Screen2 with Edit form and it works fine.
- This form is also work fine for add new record.
- Connect another details table from Data Sources
- Details table with 50 records against all 10 records of master tableĀ
- Load data at Gallery at Scrollable Screen Screen3 for selected record in master table gallery and it also works fine.
- Creating another Edit form at New Blank Screen Screen4 by selecting details table as Data Source and Add Fields
- Above form will show data based on selected record in Details Gallery, but it is not editable.
- Even try to add new record, no textbox is showing.
Please help or suggestions in it ASAP.
Thanks in advance.
Regards,
Jiken——————————
JIKEN
—————————— -
Koen Mathijs
MemberNovember 29, 2021 at 3:13 AM
Hi,can you maybe share your code for below properties of your edit form in Screen4:
* datasource
* items
* DefaultmodeYou added an Edit Form and not a Display Form I guess?
——————————
Koen Mathijs
——————————
——————————————- -
JIKEN DUBAL
MemberNovember 29, 2021 at 10:05 AM
Hi Koen,Below properties of edit form in Screen4:
* datasource: details table connected at on-premise SQL Server DB.
* item: Gallery3.Selected
* Defaultmode: EditYes I have added Edit form and not display form.
I have tried copied 1st form and change datasource from master table to details table.
Removed old fields and selected new fields its properties are changed. – š——————————
JIKEN
——————————
——————————————- -
Koen Mathijs
MemberNovember 29, 2021 at 11:14 AM
Hi Jiken,not sure what you mean by “its properties are changed” but by the look of your smiley I guess it didn’t work out.
With a default 3-screen-app the property of the editform defaultmode = new but I’m not sure that this will resolve your problem. I have the feeling that it is rather related to the relationship between your master and details table. Can you maybe give some example data of your master and details table?
——————————
Koen Mathijs
——————————
——————————————- -
JIKEN DUBAL
MemberNovember 30, 2021 at 12:51 PM
HiWe can copy existing Edit Form which is in working condition and Paste it in another screen for edit details. So, change data source from master table to details table and add fields which control type is view text / view reach text and no edit text option and Data Card has only two controls DataCardValue and DataCardKey.
Here is the table data.
Master Table (MasterID is Primary Key and Clustered Index)
MasterID Name 1 Product A 2 Product B 3 Product C 4 Product D 5 Product E Details Table (DetailID is Primary Key and Clustered Index, MasterID is Foreign Key and Nonclustered Index)Ā
DetailID MasterID Color Ideal For Size 1 1 Black Boy 3-4 years 2 2 White Girl 3-4 years 3 3 Red Man 3-4 years 4 1 Yellow Boy 8-9 years 5 2 Blue Girl 8-9 years 6 3 Green Man 8-9 years 7 4 Cream Woman 8-9 years 8 5 Brown Boy Kid 10-11 years 9 1 Grey Boy 11-12 years 10 2 Orange Girl 11-12 years I hope that this will help you to understand my scenario and problem.
Please give me solution.Thanks in advance.
?——————————
JIKEN
——————————
——————————————- -
Koen Mathijs
MemberDecember 1, 2021 at 3:41 AM
Hi Jiken,I understand your problem but I can’t replicate it in my environment. I have the same setup, SQL server with master and details table and my Edit form is alsoĀ connected to the details table in a separate screen. If I add a field to the form I have all sorts of control types and it should be set to “edit text” to be editable. I Don’t know exactly why you don’t have that choice.
I can only suggest to not start from a copy and start your screen from scratch. Insert new screen – insert new edit form – connect it to your details table and add the fields that you want. You should get all the control types that you need. Otherwise I guess there is something wrong with your SQL table properties. I’m no SQL expert and I see that only the primary key is set in my environment (which is the only prerequisite). Maybe try to remove the foreign key setting?
Also have a look at this thread, it explains exactly what is going on in your case: https://powerusers.microsoft.com/t5/Building-Power-Apps/Edit-form-is-not-editable/td-p/727180. Creating the form from scratch ultimately did the trick
——————————
Koen Mathijs
——————————
——————————————- -
JIKEN DUBAL
MemberDecember 2, 2021 at 8:24 AM
Hi Guys,It is resolved as below
- Removed existing clustered index and non clustered index on details table.
- Again created clustered index and non clustered index on details table.
- Refresh table connection at Canvas App.
- Remove existing details edit form.
- Create new edit form and add required fields.
- And ?? – Fields are editable. – ??
Thank you so much for your reply.
——————————
JIKEN
——————————
——————————————- -
Koen Mathijs
MemberDecember 2, 2021 at 8:39 AM
Hi Jiken,glad to hear you got it resolved.
Also be aware that if you change anything on your SQL Table scheme after you have added the connection to a canvas app you need to at least refresh it, in some cases even remove it and add it again before those changes are reflected.
Copying forms is not always the best way to go š
——————————
Koen Mathijs
——————————
——————————————-
DSC Communities replied 3 years, 9 months ago 1 Member · 0 Replies -
-
0 Replies
Sorry, there were no replies found.
The discussion ‘Canvas App Edit Form not editable option’ is closed to new replies.