web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Edit Gallery Item Drop...
Power Apps
Unanswered

Edit Gallery Item Dropdown Selection

(0) ShareShare
ReportReport
Posted on by 46

Hello All,

 

Hope someone out there has a solution for an issue I'm running up against in a PowerApp that I'm working on.

 

Here is my situation:

 

I have made a custom edit form (manually, not with the Edit Form tool).  The form is getting input from the user and sending it over to a SQL Database, it is working great!  After a user enters data on the form, I have it updating a gallery below it, so as an item is entered, the connection refreshes and shows the new item, etc.

Now, to make this work a little better, I'd like to give the user the ability to edit the data in the gallery.  I've gotten that mostly setup for all of the manual enries.  Basically, instead of labels, I've made all of the fields text input boxes so the user can click a Pencil and all of the items in the gallery become editable as text.  My problem is how to deal with two dropdowns in there that I want the user to be able to change as well.

 

So here is my question:

 

How do I configure the dropdown list so that it:

1) inherits the value for that item in the gallery from the SQL source and

2) still allow the user the ability to change the inherited value by selecting one of the other items in the dropdown list?

 

Any advice would be greatly appreciated!

Categories:
I have the same question (0)
  • More2Learn Profile Picture
    46 on at

    Hello All,

     

    I think I got this one figured out!  I guess it helps just writing down the question.

     

    For anyone else that has gotten stumped on this here is what I did:

     

    1) Entered this in the Default box in Data section of the Advanced sidemenu:  ThisItem.(Name of Field in the reference table)

    2) Entered the Choices from the original field in the manual Edit Form in the Items box of the Data section in the Advanced sidemenu:  Table({Type:"Choice1"},{Type:"Choice2"},{Type:"Choice3"},{Type:"Choice4"})

    3) Selected Type in the Value box of the Data section in the Advanced sidemenu.

     

     

    Hope this helps someone else out there asking the same questions that I was!

  • Verified answer
    BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @More2Learn ,

     

    0. Assuming this is a Choice type, set the Items property to (this displays the possible choices in the dropdown):

    Choices(DataSourceName.ColumnName)

    1. Set the Default property to (this selects the current value): 

    ThisItem.ColumnName.Value

    2. Set the OnChange property to (this saves the new value if the user selects one):

    Patch(
     DataSourceName,
     ThisItem,
     {ColumnName: {Self.Selected.Value}}
    )

     

  • More2Learn Profile Picture
    46 on at

    Thanks BCBuizer,

     

    Your solution works perfectly!

     

    I figured it out about 5 minutes after I posted my question and tried posting the reply, but it's never shown up.

     

    Thank you very much for your assistance!  I hope this is able to help someone else out in the future.

  • Angam Profile Picture
    6 on at

    Hi BCBuizer

     

    How to do it if my data source is in Excel? I face problems onChange Property. It gives an error that the data source is either read-only or has no primary key, so the patch function can not write to it.

     

    Regards,

     

  • More2Learn Profile Picture
    46 on at

    Hi Angam,

     

    When using Excel, you might be getting this error because the Excel spreadsheet that you're trying to Patch to is open.  It works similarly in PowerBI, if you have an Excel sheet that is a datasource for a visual, you can't refresh the data if you have the file open on your local machine.

     

    I'll check on a couple of other things that could be causing that too, but for me having the file open has always been my issue.  I'll check those others and post here if I find a better solution.

     

    Hope this helps! 

  • Angam Profile Picture
    6 on at

    Hi More2Learn,

     

    Thanks for your reply

    I used the function as: Patch(Bim_original, ThisItem,{Parameters:Dropdown8_4.SelectedText.Parameters})

    The error shows that the formula has side effects and cannot be evaluated.

     

    Actually, I grouped together the dropdown with text input as shown in the figure.

    Angam_0-1685006968480.png

     

    Regards

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard