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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Fill Combobox with ID ...
Power Apps
Unanswered

Fill Combobox with ID out of selected gallery row

(0) ShareShare
ReportReport
Posted on by 16

Hi,

 

on my screen a have

 

  • a gallery with some entries I could select (only 1 needs to be selected) 
  • a new form build upon a Sharepoint list with a combobox (combobox is a lookup field in SP list)

Whenever I click on an entry in my gallery I want the ID of the selected gallery filled into my combobox and saved into my SP list.

 

First step is done with this in the DefaultSelectedItems property of the combobox:

 

Table({Value: Gallery.Selected.ID})

 

The ID is shown in the combobox as soon as I chose an item in the gallery - but it is not saved! Every other entries in the form are saved.

 

I need the form only for new data, not for editing. Do I still need the update property of the datacard, the combobox is part of?

 

In my Sharepoint list the concerning column is expecting the ID, so this should match with the data I filled into the combobox.

 

What am I doing wrong?

 

Thanks for every advice!

 

Michael

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,312 Most Valuable Professional on at

    Hi @Michael1977 ,

    Firstly you do not need Table

     

    {Value: Gallery.Selected.ID}

     

    but it is the Update of the Data Card that needs attention. Before I go further, are you saying that the field you are writing back to is a Lookup field in SharePoint? Also what are the Items of the combo box, the name of the combo box and the name of the field?

  • Michael1977 Profile Picture
    16 on at

    Hi Warren!

     

    I've shortened the term in DefaultSelectedItems and it worked as well - thanks for that!

     

    Yes - the field I'm writing the ID back is an Lookup field in Sharepoint.

     

    In items is: Choices([@Qualifications].QualificationID) where the QualificationID is the Lookup field in SP.

     

    Name of the combobox: QualificationID_DataCard1

     

    In the update property I find: DataCardValue3.Selected (which is the combobox itself)

     

    Thanks so far!

     

    Michael

  • WarrenBelz Profile Picture
    156,312 Most Valuable Professional on at

    Hi @Michael1977 ,

    Is the name of the Combo Box DataCardValue3 and the Data Card QualificationID_DataCard1? If so the Update of the Data Card should be

    {
     Value:DataCardValue3.Selected.Value
     Id:DataCardValue3.Selected.Id
    }

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Michael1977 Profile Picture
    16 on at

    Hi Warren,

     

    yes, you assume the right names.

     

    As I got an error hint I edited your code a bit with a ; in it (in Germany we need ; instead of ,)

     

    {
     Value:DataCardValue3.Selected.Value;
     Id:DataCardValue3.Selected.Id
    }

     

    Problem is: It still doesn't deliver data to my SP list. The ID field is still empty.

  • Michael1977 Profile Picture
    16 on at

    I'm having this in the Default property of the DataCard: ThisItem.QualificationID

     

    Could this be a problem?

  • WarrenBelz Profile Picture
    156,312 Most Valuable Professional on at

    @Michael1977 ,

    You need the DefaultSelectedItems set to

    {Value:ThisItem.QualificationID.Value}

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

  • Michael1977 Profile Picture
    16 on at

    Sorry Warren, it doesn't work.

     

    When I had

     

    {Value: Gallery.Selected.ID}

     

    in my DefaultSelectedItems at least it shows the selected ID in the combobox (but doesn't save it to SP).

     

    When I changed it to

     

    {Value:ThisItem.QualificationID.Value}

     

    it doesn't show any selection I've done and doesn't save it to my SP list was well.

  • WarrenBelz Profile Picture
    156,312 Most Valuable Professional on at

    Hi @Michael1977 ,

    This should be very easy to solve - there are only four items involved here and they simply have to match)

    • Items of the Combo Box
    • DefaultSelectedItems of the Combo Box
    • Update of the Data Card
    • If you are writing back to a Lookup field, the list and field (the other list) it is looking up.

    However there seems to be a bit missing and apart from the above (can you please post these in Text so I have them all in one place), why are you trying to write an ID (a number) back to a lookup field which is Text?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

     

  • Michael1977 Profile Picture
    16 on at

    Hi Warren,

     

    in the end, I'm using my gallery on the left side of my screen as some kind of big combobox itself. There is a lot of text to show and not enough room for it in a normal combobox.

     

    So: I click on an entry in my gallery on the left side and the ID is filled in the combobox as part of my New Form on the right side. Besides some additional data I need in the form.

     

    But you are right: By now a simple number field instead of a lookup field in Sharepoint would be enough to cover this functionality. Currently I've only selected the ID value to be inserted within SP. My idea was to build it up with some additional values if I need them in SP.

     

    The Qualifications list is a simple combination table for

    • EmployeeID
    • QualificationOfferID (which I get as the selected 'ID' from my gallery)

     

    The result would be a list of every Qualification every Employee has (1:1 relation).

  • WarrenBelz Profile Picture
    156,312 Most Valuable Professional on at

    Hi @Michael1977 ,

    I was nearly going to send you to my "getting started" blog earlier - I have not used Lookup columns for many years and you really have to seriously ask yourself why you are using them.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 377 Most Valuable Professional

#2
11manish Profile Picture

11manish 165 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 110 Super User 2026 Season 2

Last 30 days Overall leaderboard