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 / Combo box with other d...
Power Apps
Answered

Combo box with other datasource

(0) ShareShare
ReportReport
Posted on by 99

Hi,

I have 02 list in Sharepoint TblMenuUserGrupo and TblGrupo like the example below

TblMenuUserGrupo
IdUserIdGrupo
NF0161
NF0163
NF0182

and

TblGrupo 
IdGrupoDescGrupo
1Administrator
2Supervisor
3Planning

 

I have a ComboBox in the form "DataCardValue13" but i need to appear the field "DescGrupo" in the list of ComboBox from the TblGrupo and i need to save the information (the results: IdGrupo) in the field IdGrupo of the TblMenuUserGrupo.

 

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @EdevaldoJeronim 

    Change your Items property of the combobox to: TblGrupo

    If it is the IdGroup that you need to store or display from, then this will give you what you need.

     

    I hope this is helpful for you.

  • EdevaldoJeronim Profile Picture
    99 on at

    @RandyHayes , thank you,

    I changed the item property to TblGrupo and now the "DescGrupo" appears in the list of ComboBox to select but the field "IdGrupo" is the information i need to save and is not appear for i link and save

    EdevaldoJeronim_0-1613505508949.png

    EdevaldoJeronim_1-1613505691233.png

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @EdevaldoJeronim 

    In your update property you can reference the selected item in the combobox and its associated IdGrupo.

    Your Update Property:

        DataCardValue13.Selected.IdGrupo

     

    You'll also want to set the DefaultSelectedItems property to properly show the item from the record when you are editing an existing record.

    DefaultSelectedItems:

        LookUp(tblGrupo, IdGrupo=Parent.Default)

  • EdevaldoJeronim Profile Picture
    99 on at

    Hi @RandyHayes ,

    For the Update Property "DataCardValue13.Selected.IdGrupo" appears the error "expected the record value" 

    and

    DefaultSelectedItems:

        "LookUp(tblGrupo, IdGrupo=Parent.Default)" appear the error "invalid argument type"

     


    Could you help me?

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @EdevaldoJeronim 

    The formula was based on the assumption that you were storing a simple value in your list.  You appear to have a complex column.

    So...what type of column is field IdGrupo in the TblMenuUserGrupo list?

  • EdevaldoJeronim Profile Picture
    99 on at

    @RandyHayes,  It's a complex collumn, the IdGrupo is a lookup field in TblMenuUserGrupo from TblGrupo.

     

    I'm moving all Database from Microsoft Access to Sharepoint to start to use the Power Apps and the Database is very structured (almost 30 tables / list), the main Tables are with around 150.000 records and I use the Lookup field to keep the Foreign key.

    What your opnion about the LookUp field in Sharepoint? I work with Access, Oracle, SQL Server but in this case I only have Sharepoint or maybe i'll try to request access to the CDS Database but I don't have many experience with this package

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @EdevaldoJeronim 

    It's all good, we just need to give the Lookup column what it wants... and Id and a Value.

    So, your Update property should become:

    {
     Id: DataCardValue13.Selected.ID,
     Value: DataCardValue13.Selected.Title
    }

    Now in the above, you'll need to replace Title with whatever column is the column used in your Lookup definition.  So, look at the definition in SharePoint and see which column you are using to connect to the other table, then substitute that above.

     

    For the DefaultSelectedItems property of DataCardValue13, set it to:

        LookUp(tblGrupo, IdGrupo=ThisItem.IdGrupo)

  • Verified answer
    EdevaldoJeronim Profile Picture
    99 on at

    Thank you very much @RandyHayes 

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard