cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
msuser48
Helper I
Helper I

Change field control type in form, which derives data from a gallery

I have the following gallery_1, which is connected to an SQL Server database table:

msuser48_1-1656415487492.png

When clicking the "Edit" pencil, I navigate to this screen:

msuser48_2-1656415574716.png

This image above is form_1, which has gallery_1.Selected as the "Item" property.

 

Per default, this works fine - upon clicking "Edit", all field values are displayed in form_1 correctly. However, I need to do 2 custom things, which do not work:

 

1) I need to change the form control of individual fields to drop-down. "Activity" field was for example changed to "allowed values" in the form's form control menu, as I want the text field converted to drop-down here. This does not work due to invalid data type, as you can see in the image.

- How to fix?

2) Aside from displaying the value from gallery_1 as a drop-down in form_1 upon clicking "Edit", the user needs to be able to change to other drop-down values available from a list. This list is contained in an SQL Server DB table different from the form's data source.

- How to accomplish this?

 

Thanks!

 

 

 

1 REPLY 1
rbrooks66
Resolver I
Resolver I

I had a similar issue.  I will explain what I did and you can determine if that will help you out.  I developed a Canvas App and when I have the Detail screen displayed, the user can click the Edit button and the Edit screen is shown.  By default, the Form in Edit mode just has a bunch of text fields.  I didn't want to allow the users to enter free text (for obvious reasons) and had reference tables for the selections of most of the fields.

Detail screen:

Screenshot 2022-06-16 083043 PreLoad Detail.png

So, what I did was to use the Form but hide it.  Then, I added the drop downs attached to SQL Views.  I used the data from the Detail screen to prefill the drop down values and created a set of variables on visible to capture changes to the drop downs.  Then, I would update the hidden forms based on changes made to the form that was displayed.  This way I could still take advantage of the Submit because although the form was hidden, it was still being updated as if it were displayed.  Hope that helps or at least gives you an idea.

Edit Screen:

Screenshot 2022-06-16 083224 PreLoad Edit.png

 

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (2,298)