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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Can't Convert Table to...
Power Apps
Answered

Can't Convert Table to Text Error in Gallery

(0) ShareShare
ReportReport
Posted on by 5,325 Super User 2025 Season 2
I am trying to filter Ggallery1 with the formula at the bottom of this screen, but I keep getting this error on
the colShowName.Value 

     Can't convert this data type. Power Apps can't convert this Table to Test.

The colShowName.Value is coming from a Checkbox control in Gallery2.

The 'Items' of Gallery2 has -
SortByColumns(
   Distinct(
      col_Event_Data_Collection,
      Show_Name
   ),
   "Value",
   SortOrder.Ascending
)
 
The 'OnCheck' of the Checkbox in Gallery2 has -



I have tried multiple configuration of the below and can't get the error to clear on 
colShowName.Value 

What am I missing?
******************************************************************************************


Switch(Newest_to_Oldest_Gallery_Sort_Dropdown.Selected.Value,"Created: Newest to Oldest",
    Sort(
         Filter(
            col_Event_Data_Collection,
              And(
                 Or(
                    Or(
                    Keyword_Search_Fld.Text in Title,
                    Keyword_Search_Fld.Text in Venue_Name,
                    Keyword_Search_Fld.Text in Opening_Date
                ),col_Event_Data_Collection.Show_Name in colShowNames.Value
            ))),
        Created,SortOrder.Ascending),"Created: Oldest to Newest",
    Sort(
         Filter(
            col_Event_Data_Collection,
              And(
                 Or(
                    Or(
                    Keyword_Search_Fld.Text in Title,
                    Keyword_Search_Fld.Text in Venue_Name,
                    Keyword_Search_Fld.Text in Opening_Date
               ),col_Event_Data_Collection.Show_Name in colShowNames.Value
            ))),
        Created,SortOrder.Descending
    )
)
Categories:
I have the same question (0)
  • Suggested answer
    Ravi-Prajapati Profile Picture
    416 Super User 2025 Season 2 on at
    It looks like colShowNames.Value is a table, but Show_Name in col_Event_Data_Collection is a single value. The "Can't convert this data type" error happens because Power Apps can't compare a single value to a table.
    Possible Issue:
    The Checkbox inside Gallery2 doesn't store just a single value but contributes to a collection (colShowNames).
    The collection (colShowNames) might have been created incorrectly, storing the entire record instead of just the Value field.
    You might need to extract values properly from colShowNames.
    Fix:
    Instead of:

    col_Event_Data_Collection.Show_Name in colShowNames.Value
    Try:
    powerapps
    Copy
    Edit
    col_Event_Data_Collection.Show_Name in colShowNames.Value
    Replace it with:

    col_Event_Data_Collection.Show_Name in colShowNames
    or explicitly extract values:

    col_Event_Data_Collection.Show_Name in ShowColumns(colShowNames, "Value")
    Additional Debugging Tips:
    1️⃣ Check how colShowNames is stored
    Before filtering, check what colShowNames contains:

    ClearCollect(colShowNames, Gallery2.Selected.Value)
    If colShowNames is storing records instead of just Value, modify it:

    ClearCollect(colShowNames, ShowColumns(Gallery2.AllItems, "Value"))
    Then use ShowColumns(colShowNames, "Value") in your filter.
    2️⃣ Ensure 'OnCheck' is correctly adding values
    Your Checkbox OnCheck should be adding selected items properly:
    powerapps
    Copy
    Edit
    Collect(colShowNames, { Value: ThisItem.Value })
    And OnUncheck should remove them:

    RemoveIf(colShowNames, Value = ThisItem.Value)
  • Suggested answer
    Giraldoj Profile Picture
    771 Super User 2025 Season 2 on at
    Hi There

    I think you are facing the issue because the content of colShowNames.Value The error "Can't convert this Table to Text" happens because the value of colShowNames could contain more than one record so colShowNames.Value is being treated as a table when the in operator expects a single value or a single-column table,

    try the following options

    Replace:
    col_Event_Data_Collection.Show_Name in colShowNames.Value
    
    With:
    col_Event_Data_Collection.Show_Name in ShowColumns(colShowNames, "Value")
    OR
    col_Event_Data_Collection.Show_Name in colShowNames.Show_Name


    If colShowNames contains multiple values from checkboxes, use:
    col_Event_Data_Collection.Show_Name in Split(Concat(colShowNames, Value & ";"), ";")

    If that does not help you could consider to use the search function instead of the filter one.
     
    Let me know if you need further adjustments! 
  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at
    Thank you for you detailed reply.

    I attempted all recommendations. There was no change. 

    The following is still getting and error on the Value.
    col_Event_Data_Collection.Show_Name in colShowNames.Value

    I did confirm the Checkbox was loading the choice into colShowNames. The column
    created is 'Value'.



    Below is a screenshot from the video I followed. Everything is working except
    this land piece of formula. One difference, he is 'ProjectLookUp.Name -
    a 'Person' lookup column from SharePoint. Everything else is the same. 
  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at
    Attempt all. Still getting errors.


    Can't convert this data type. Power Apps can't convert this Table to Text.



    Invalid schema, expected a one-column table.

  • Verified answer
    WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at
    Coming in here as I was involved with this issue earlier on another thread - also a gentle reminder (you have been posting here for many years) to please include all code in Text (in addition if you also post an error screenshot) - save re-typing on this end.
    Your fundamental issue I believe is actually much simpler - you do not need to repeat the collection name as you are already filtering it
    You also have a redundant Or() function in there (though this does not affect the code result). You can also greatly simplify / condense what you have like this
    With(
       {
          _Order: 
          Switch(
             Newest_to_Oldest_Gallery_Sort_Dropdown.Selected.Value,
             "Created: Newest to Oldest",
             SortOrder.Descending,
             "Created: Oldest to Newest",
             SortOrder.Ascending
          )
       },
       Sort(
          Filter(
             col_Event_Data_Collection,
             And(
                Or(
                   Keyword_Search_Fld.Text in Title,
                   Keyword_Search_Fld.Text in Venue_Name,
                   Keyword_Search_Fld.Text in Opening_Date
                ),
                Show_Name in colShowNames.Value
             )
          ),
          Created,
          _Order
       )
    )
     
    Please click Does this answer your question 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 a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   
     
  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at
    I tried it with my formula, without the extra 'Or'. As you said, not change.

    If I leave out the sort and just filter, as below, both the 'Keyword' manual entry work fine.
    Filter(
        col_Event_Data_Collection,
        And( Or(
            Keyword_Search_Fld.Text in Title,
            Keyword_Search_Fld.Text in Show_Name
        )
    ))


    I tried it with the formula your suggested, stil no sort.
    With(
       {
          _Order: 
          Switch(
             Newest_to_Oldest_Gallery_Sort_Dropdown.Selected.Value,
             "Created: Newest to Oldest",
             SortOrder.Descending,
             "Created: Oldest to Newest",
             SortOrder.Ascending
          )
       },
       Sort(
          Filter(
             col_Event_Data_Collection,
             And(
                Or(
                   Keyword_Search_Fld.Text in Title,
                   Keyword_Search_Fld.Text in Venue_Name,
                   Keyword_Search_Fld.Text in Opening_Date
                ),
                Show_Name in colShowNames.Value
             )
          ),
          Created,
          _Order
       )
    )
    
  • Verified answer
    WarrenBelz Profile Picture
    153,079 Most Valuable Professional on at
    The code I supplied works perfectly here (including the Sort) on a model I built with your exact field names and types,
    You can take Opening_Date out of the search as dates are only searchable for equals or greater/less than. You should also be able to go back to your "long" version (you can remove the extra Or) with the values I highlighted removed.
  • Suggested answer
    Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at
    Sorry to everyone for the back and forth.

    I finally got to the issue. I was using 'Classic' controls, when this effort required 'Moden' controls

    The sort / filter is working properly now.

    Thank you to those who stuck in there with me.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard