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 / Polymorphic not showin...
Power Apps
Answered

Polymorphic not showing up in Combobox Control in Edit-Form (DefaultSelectedItems)

(0) ShareShare
ReportReport
Posted on by 42

Hello, 

 

i'm struggling with the DefaultSelectedItems in a Edit-Form, because This.Item won't show up in the Combobox Control.

 

Here are screenshots for better understanding:

The Code for Items is: 

If(Radio1.Selected.Value = "Kontakt"; Distinct(Kontakte; 'Vollständiger Name'); Distinct(Firmen;Firmenname))

 

BaumR_1-1716478298702.png

 

But then i tried the normal Combobox. With this it worked fine and the default Value from the selected form-item is being displayed.

BaumR_2-1716478412057.png

 

Can somebody help me with this issue? What am i doing wrong?

Categories:
  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @BaumR - the ComboBox is expecting a Record, not a Table (indicated by the square brackets).

     

    If(
     IsType(
     ThisItem.Kunde;
     Kontakte
     );
     AsType(
     ThisItem.Kunde;
     Kontakte
     );
     AsType(
     ThisItem.Kunde;
     Firmen
     )
    )
  • BaumR Profile Picture
    42 on at

    @Amik wrote:

    @BaumR - the ComboBox is expecting a Record, not a Table (indicated by the square brackets).

     

     

    If(
     IsType(
     ThisItem.Kunde;
     Kontakte
     );
     AsType(
     ThisItem.Kunde;
     Kontakte
     );
     AsType(
     ThisItem.Kunde;
     Firmen
     )
    )

     



    Thanks for your Solution. I already tried it. But this also isn't working unfortunatly. 

    BaumR_0-1716535622097.png

     

    Also what i tried, what didn't worked:

     

     

    If(
     IsType(ThisItem.Kunde; Kontakte);
     [{ 'Vollständiger Name': AsType(ThisItem.Kunde; Kontakte).'Vollständiger Name' }];
     [{ Firmenname: AsType(ThisItem.Kunde; Firmen).Firmenname }]
    )

     

     

     

    If(
     IsType(ThisItem.Kunde; Kontakte);
     Filter(Kontakte; 'Vollständiger Name' = AsType(ThisItem.Kunde; Kontakte).'Vollständiger Name');
     Filter(Firmen; Firmenname = AsType(ThisItem.Kunde; Firmen).Firmenname)
    )

     

     

    All didn't worked. Did i make a mistake somewhere else?

     

    Thank you!

  • Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @BaumR - the Items and the DefaultSelectedItems property of your ComboBox must have the same table schema. 

     

    Remove the Distinct function from the Items property and replace with either:

     

    Kontakte

     

    Or:

     

    Firmen
  • BaumR Profile Picture
    42 on at

    Ah great! Thanks!

    When i just use one of the tables, it's working.

     

    I have tried it last time unsuccessful with this code:

    If(Radio1.Selected.Value = "Kontakt"; Kontakte; Firmen)

    Is there any chance that i can get both tables into the Combobox?

  • Verified answer
    Ami K Profile Picture
    15,689 Super User 2024 Season 1 on at

    @BaumR - does not work that way. You will need separate Data Cards for Contacts and Accounts.

  • BaumR Profile Picture
    42 on at

    I got it to work now with 2 seperate Comboboxes over each other and whatever is clicked at the Radio Button, the right Combobox will show up. 
    So Contact Combobox shows up, when Radio Button is clicked on "Kontakt".

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 345 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 225

#3
M Bilal Khan Profile Picture

M Bilal Khan 192

Last 30 days Overall leaderboard