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 / Combobox only has 1 it...
Power Apps
Answered

Combobox only has 1 item: DefaultSelectedItems make it select that item

(1) ShareShare
ReportReport
Posted on by 878

So I have several Comboboxes that have their items populated like so:

Table({Value: IfError(Index(Split(DataCardValue2.Text; " "); 1).Value; "")})

Meaning, theres a Textinput that the user will put a lot of numbers, separated by a space. Example: user inputs into DataCardValue2 "123 1234 12345", so Comboboxes 1 2 and 3 should have a single item of "123" "1234" "12345", respectively.

I need to edit the DefaultSelectedItems property of all of these databoxes so that each selects the singular first item they have. 

How can I edit that property to make it so?

Ty in advance 😄

Categories:
I have the same question (0)
  • Verified answer
    ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @WorkingRicardo , Try this: 

    {Value: First(Split(DataCardValue2.Text; " "))}

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    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.👍

    Thanks,
    ANB


  • Verified answer
    SidJohri Profile Picture
    24 on at

    Hi @WorkingRicardo ,

     

    Trying to refer to a combox's Items property in its own DefaultSelectedItems property would create a circular reference which Power Apps will not allow. So, what you'll want to do is essentially repeat the Items property formula in the DefaultSelectedItems property and take the First() item from the table.

     

    Combobox1.DefaultSelectedItems = First(Table({Value: IfError(Index(Split(DataCardValue2.Text; " "); 1).Value; "")}))

    Combobox2.DefaultSelectedItems = First(Table({Value: IfError(Index(Split(DataCardValue2.Text; " "); 2).Value; "")}))

    etc.

     

    As an aside, what is the use case for a combobox to display a single item. Why not simply use a label to do so?

     

    Hope this helps,

      -- Sid.

     

    ---------

    Please click Accept as solution if my post solved your issue. This will help others find it more easily. If my solution was helpful in other ways, please consider giving it a Thumbs Up.

     

  • WorkingRicardo Profile Picture
    878 on at

    Hey @SidJohri and @ANB 

    Thank you for your replies! Both solutions worked for me. So I'll chose any of those randomly haha (didn't get the delegation problem)

    This is the only way I figured out how to block text to be copied from my app. As we want users to be able to access the info, but at least make it hard for them to extract data. With text labels, even if adding a transparent rectangle, you can still copy Textlabel content with Ctr+A (select all). Selected items in combobox bypasses the Ctr+A. 

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 96 Super User 2026 Season 1

Last 30 days Overall leaderboard