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 and Content Type
Power Apps
Answered

Combo and Content Type

(0) ShareShare
ReportReport
Posted on by 168

I have a table that pick up records in a SharePoint library. Is it possible to use the content type in a combo box to pick up the names of the content type used in the library. I have the following in the Items property which seems to have values but no display name.

 

TemplateTable.'{ContentType}'

Categories:
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Ianhall1892 , 

    According to your description, I made a test for you. 

     

    By using the formula [ TemplateTable.'Content Type'.Name ], power apps will report an error. 

    I am afraid that powerapps does not support this data type now. 

    However, If you create a collection for TemplateTable.'Content Type', the value of Namecan be seen in collection. 

    So, I suggest you create a table that records the relationship between Id and Name

    Then use filter() function to filter the records by Id through this relationship between Id and Name

     

    For example: 

    1\ This is my test document library. I named it 'AABBCCDDEE'.  

    v-xiaochen-msft_0-1606362910233.png

     

     

    2\ I create a collection for the test document library. There are 2 content types in it.

    Create a button and set its onselect property to:

    ClearCollect(AAA,ForAll( Distinct(AABBCCDDEE,'Content type'.Id),LookUp(AABBCCDDEE,'Content type'.Id=Result).'Content type')) //AAA is my collection name

    v-xiaochen-msft_1-1606362910236.png

     

      //Choose file collections .you will see this table and see their names.

     

    3\ So ,I create a relationship list for 'Id' and 'Name'. I named it 'TestA'. Id and Name are one to one relationship. Each record is a content type in your document library. In my test document library AABBCCDDEE, I have two content types of Items, so I created two records.

    It is worth noting that in different document libraries, the same content type of Id is different.

    If you have less than five types(<=5 😞

    3.1  Create 2 fields.Id and Name

    v-xiaochen-msft_2-1606362910237.png

     

    3.2  Through my collection, I know that I have Items of content type 'Summary Task', so I input its Id and Name into the Id Field and Name Field in TestA.      // You can create a gallery to display content type’ ‘s Id and copy it.

    3.3  Through my collection, I know that I have Items of content type 'Document', so I input its Id and Name into the Id Field and Name Field in TestA.

    3.4  This is my TestA

    v-xiaochen-msft_3-1606362910238.png

     

    If you have more than five types(>5 😞

    You can use LastN() function on collection. Like this:

    LastN(ClearCollect(AAA,ForAll( Distinct(AABBCCDDEE,'Content type'.Id),LookUp(AABBCCDDEE,'Content type'.Id=Result).'Content type')),5)

     

    4\ Add a combo box control 'ComboBox2' and set its Items property to:

    TestA

     

    5\ Add a gallery control and set its Items property to:

    Filter(AABBCCDDEE,'Content type'.Id=ComboBox2.Selected.Id)

    6\ The result is as follows:

    v-xiaochen-msft_4-1606362910240.png

     

    Best Regards,

    Wearsky

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
11manish Profile Picture

11manish 402 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 296 Most Valuable Professional

Last 30 days Overall leaderboard