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 selection le...
Power Apps
Answered

Combo box selection length

(0) ShareShare
ReportReport
Posted on by 73

Hi I'm trying to check the length of the selected item, I'm trying len(datacardvalue7.selecteditems)  but all I get is a redline error. Basically I want to check if the combobox selected item has a legth greater than 0. 

 

Any help is appreciated.

 

 

Categories:
I have the same question (0)
  • Verified answer
    iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Len() is for counting the number of elements within a single string, CountRows() is for counting how many items there are (i.e. how many items are selected). You are trying to determine if there is a valid item(s) selected.

     

    In your example, you are referencing .SelectedItems which is a multiple-item property

     

    You can either do the following for a singular selected item (assuming this is a single-select-only combobox)

    Len(datacardvalue7.Selected.Value) > 0

    (it may be another property than .Value)

     

     

    Or you can reference the number of selected items, but from your description it sounds like you want to check whether the selected item itself is valid rather than the number of selected items:

    CountRows(datacardvalue7.selecteditems) > 0

     

    Cheers,

    Sancho

     

  • WalesMariner Profile Picture
    73 on at

    Amazing Sancho thank you so much!

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Happy to help and share the knowledge 🙂

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
WarrenBelz Profile Picture

WarrenBelz 519 Most Valuable Professional

#2
11manish Profile Picture

11manish 489

#3
Haque Profile Picture

Haque 327

Last 30 days Overall leaderboard