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

Help with a Quick Code for Editing Gallery Dropdown Item

Hi All - Need help with a quick code line:

 

when editing details from a collection... the coding used for a text input item is:  Gallery1.Selected.@#$#@ (name of the list-item in the collection).   I'm trying to find the coding for a Dropdown Box that i have in building my collection.

The Collection colum title is  Managed  and the name of the drop down box is called  Managed_YN . 

her is what i'm using to add the dropdown item to the collection:   {Managed: Managed_YN.Selected.Value}   

 

How do I pull this to the Edit Screen??    I tried    Gallery1.Selected.Manged  isn't working I know its something simple... LOL.. 

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Help with a Quick Code for Editing Gallery Dropdown Item

Hi @MichaelSmith,

 

Not sure if I have understood your scenario correctly but here is my understanding:

You have a collection created by values from a dropdown control. Now you have put this collection as the data source of a Gallery control. You want to know how to set to edit the records of this collection in an EditForm.

 

If my understanding is correct, please follow below steps to achieve this:

1. When selecting a record inside the gallery, you should first view the record details and then decide to edit the record or not.

In 1st screen, you have the dropdown to create the collection and the gallery control to show the collection. In the template part(first part) of Gallery control, set the OnSelect property of the > icon to:

 

Navigate(Screen2,None)

 

2. In the Screen2, insert a DisplayForm, set its DataSource to CollectionName. Set its Item property to:

Gallery1.Selected

3. If you do not see any pickable data cards under the data source of DisplayForm, then just select the ellipsis under it and select "Add a custom data card". In this new data card, insert a Label control, and set its Text property to:

ThisItem.Managed

Capture.JPG

Insert a > button, and set the OnSelect property to:

Navigate(Screen3,None)

4. Then add the Screen3 and insert an EditForm. Except for inserting TextInput/Dropdown control instead of Label control, other steps are pretty the same as step3. 

 

This is a typical app which has the same architecture as the app that created with Start with your data. You can first try to create an auto-generated app with Start with your data using other connections and test around to see how to create your own one.

 

Regards,

Mona

 

 

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 REPLY 1
Community Support Team
Community Support Team

Re: Help with a Quick Code for Editing Gallery Dropdown Item

Hi @MichaelSmith,

 

Not sure if I have understood your scenario correctly but here is my understanding:

You have a collection created by values from a dropdown control. Now you have put this collection as the data source of a Gallery control. You want to know how to set to edit the records of this collection in an EditForm.

 

If my understanding is correct, please follow below steps to achieve this:

1. When selecting a record inside the gallery, you should first view the record details and then decide to edit the record or not.

In 1st screen, you have the dropdown to create the collection and the gallery control to show the collection. In the template part(first part) of Gallery control, set the OnSelect property of the > icon to:

 

Navigate(Screen2,None)

 

2. In the Screen2, insert a DisplayForm, set its DataSource to CollectionName. Set its Item property to:

Gallery1.Selected

3. If you do not see any pickable data cards under the data source of DisplayForm, then just select the ellipsis under it and select "Add a custom data card". In this new data card, insert a Label control, and set its Text property to:

ThisItem.Managed

Capture.JPG

Insert a > button, and set the OnSelect property to:

Navigate(Screen3,None)

4. Then add the Screen3 and insert an EditForm. Except for inserting TextInput/Dropdown control instead of Label control, other steps are pretty the same as step3. 

 

This is a typical app which has the same architecture as the app that created with Start with your data. You can first try to create an auto-generated app with Start with your data using other connections and test around to see how to create your own one.

 

Regards,

Mona

 

 

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 310 members 4,723 guests
Recent signins:
Please welcome our newest community members: