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 / Can i use showcolumn f...
Power Apps
Answered

Can i use showcolumn for a Combobox selectedItems

(0) ShareShare
ReportReport
Posted on by 1,837 Season of Giving Solutions 2025

I have this formula as part of a combobox items property:-

 

Filter(
 Distinct(colRelatedPostingUnPostingForms, 'Location Name') As v, v.Value in ShowColumns(Filter(Locations,
 StreetTitleSync in ShowColumns(PostingFormStreetComboBox.SelectedItems,"Title")),"Title"))

 

 

 

the idea is that i only want to show the Location Name for the selected Streets from the PostingFormStreetComboBox... but currently i am getting that the ShowColumns has some invalid arguments.. any advice?

Categories:
I have the same question (0)
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @johnjohnPter,

    How you set the Items property of PostingFormStreetComboBox?

    You have to provide more details.

     

    Not sure the relationships between StreetTitleSync and Title, I have a test on my side, it works.

    Note that I refer to the Requestor column always as the ComboBox column and collection column on my side.

    vqiaqimsft_0-1703726441047.png

    It proves thatSshowColumns() for a Combobox selectedItems works.

  • johnjohnPter Profile Picture
    1,837 Season of Giving Solutions 2025 on at

    @v-qiaqi-msft the items for the PostingFormStreetComboBox is as follow:-

     

    Distinct(colRelatedPostingUnPostingForms,Street)

     

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @johnjohnPter,

    Well, that proves that your second ShowColumns() does have an invalid arguement, because Distinct(colRelatedPostingUnPostingForms,Street) only returns a single column named Value including the items from Street column, there is no "Title" column, which means you could not specify the Title column in your ShowColumns(PostingFormStreetComboBox.SelectedItems,"Title").

     

    ShowColumns() function could only apply to the columns existing in the data source.

  • johnjohnPter Profile Picture
    1,837 Season of Giving Solutions 2025 on at

    @v-qiaqi-msft  That makes sense to me,, so what i need to do now is there any workaorunds?

    Thanks 

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @johnjohnPter,

    I even do not know which column you want to filter based on...😂

    If you want to include the Title column in your second ShowColumns() function, try to not use a Distinct() function but use the original data source.

  • johnjohnPter Profile Picture
    1,837 Season of Giving Solutions 2025 on at

    @v-qiaqi-msft ok i removed the Showcolumn, as follow:-

     

    johnjohnPter_0-1703730054482.png

     

    but still getting an error.. any advice?

     

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @johnjohnPter,

    Could you please provide the needed details when you have an error?

    What is this sepecific error?

    And, further, the column type is the important thing in your thread, so are the realtionships between StreetTitleSync and street from PostingFormStreetComboBox.

     

    Actually, it is a new question, I think you should open a new case for friendly communication.

    Remember to attach the above mentioned info to your thread.

     

     

  • Verified answer
    WarrenBelz Profile Picture
    154,445 Most Valuable Professional on at

    @johnjohnPter ,

    @v-qiaqi-msft is correct on that you do not need ShowColumns(), but this is not the principal issue here. You have a many-to-many relationship, which needs a different approach. The code below is based on the assumption that what you have posted are the correct references as I cannot see your data (or app) and is more to give you a direction you need to take.

    With(
     {
     _Forms:
     Distinct(
     colRelatedPostingUnPostingForms, 
     'Location Name'
     ),
     _Select:
     Filter(
     Locations,
     StreetTitleSync in PostingFormStreetComboBox.SelectedItems.Title
     )
     },
     Ungroup(
     ForAll(
     _Forms As _Post,
     Filter(
     _Select,
     Title in _Post.Value
     )
     ),
     "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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • johnjohnPter Profile Picture
    1,837 Season of Giving Solutions 2025 on at

    @WarrenBelz thanks a lot it worked.. but what does ungroup do exactly ?

  • WarrenBelz Profile Picture
    154,445 Most Valuable Professional on at

    @johnjohnPter ,

    Please mark as solution - it is needed in this case as each ForAll sequence produces a single Table field called Value with all the matched items inside. It has other related uses in expanding a Table field in a record to produce multiple records for each item in the Table field - documentation is here.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard