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 get ComboBox Def...
Power Apps
Suggested Answer

Can't get ComboBox DefaultSelectedItems to work

(2) ShareShare
ReportReport
Posted on by 40
I have this Named Formula:
IdeaBenefits = ["","Montary Benefits","Customer Service","Improved Morale","Improvement of Organizational Communication","Safety/Health","Working Conditions","Improve Consumer Outcomes","Process Improvement","Product Improvement","Reduce Paperwork","Other"];
The ComboBox Items property is set to:
IdeaBenefits
The ComboBox DefaultSelectedItems property is set to:
 
If(
    IdeaFormEdit,
    Filter(
        IdeaBenefits,
        Value in Split('List Ideas Gallery'.Selected.'Potential Benefits', ";")
    ),
    []
)
 
(Each "Idea" can have multiple benefits so this is a multi-select ComboBox)
 
All the other controls are working perfectly, just the one ComboBox is not. Nothing becomes selected when it should be.
 
For an example, when I put 'Potential Benefits' into a simple text label for a particular Idea, it shows "Montary Benefits#;Customer Service#;Improved Morale#;" (idk why the last dev added the hashes, I did try adding that in the split delimiter but it still didn't work.
 
Any ideas?
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,362 Super User 2025 Season 2 on at
     
    Since we cannot see what the value of 'List Ideas Gallery'.Selected.'Potential Benefits' is, its easy to say thats the issue but let's take it further
     
    Add a second gallery or a list or a combobox I dont care
    Assuming that 'List Ideas Gallery'.Selected.'Potential Benefits' produces a collection of Strings, again strings, if you just put your split function in its items property what do you get back?
     
    Next,
     
    I'm not sure I would have used a named formula for essentially a collection but hey :-) thats up to you, but thats just me.
     
    Or
     
    instead of doing your split you could do concat which will just create a string, and then the in fill find it assuming Value is coming out what you want (meaning) the individual items in IdeaBenefits
     
    So that you are checking the string alone versus trying to do essentially a contains for an array of things you get back.
     
    If(
        IdeaFormEdit,
        Filter(
            IdeaBenefits,
            Value in Concat('List Ideas Gallery'.Selected.'Potential Benefits', Value & "")
        ),
        []
    )
     
     
  • HJ-23070237-0 Profile Picture
    40 on at
    Thanks for the reply Michael. With this new horrible forum I hope you see my response, I can't tag you or reply to your comment.
     
    So I selected an idea in the gallery and the put "'List Ideas Gallery'.Selected.'Potential Benefits'" in a textbox and it gave me "Montary Benefits#;Customer Service#;Improved Morale#;"
     
    As per your suggestion, I added a combo box and made the Items property "Split('List Ideas Gallery'.Selected.'Potential Benefits', "#;")" and then it did correctly show the items that were selected for that selected Idea.

    However in that new ComboBox if I set DefaultSelectedItems also to "Split('List Ideas Gallery'.Selected.'Potential Benefits', "#;")", it still is selecting nothing, even though we now know that formula is returning valid results.

    Using concat changed nothing.
     
    Edit:
    @Michael E. Gernaey
    It let me tag this time
  • HJ-23070237-0 Profile Picture
    40 on at

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard