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 / Allow multiple selecti...
Power Apps
Answered

Allow multiple selections in a form

(0) ShareShare
ReportReport
Posted on by 51

Hi, 

I have created a form in Power Apps where City is filtered by Country based on another source file lookup. However, I am trying to allow users to select multiple cities. When I tried in using the regular data card that comes in as default it does filter to the cities in the country selected. However, in the case of a listbox, it shows blank data. I am attaching my screenshots as well as the formula below. 

Any ideas or suggestions would be highly appreciated

syasmin25_0-1634846548174.png

 

 

syasmin25_0-1634846652185.png

 

Categories:
  • Verified answer
    anibra Profile Picture
    278 on at

    Hi syasmin25. You can try the filter formula: Filter(Cities,Dropdown2.Selected.Value in Country).Name 

     

    anibra_0-1634850895743.png

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @syasmin25 

    I would suggest avoiding the Listbox control for your form.  An important aspect of forms is reviewing existing records (Editing).  The problem with a listbox is that there is no way to set the listbox to show the selected values of the underlying record.  In other words, when the user goes to review an existing record, the listbox will show your filtered list of cities, but none of them will show what was actually selected before when it was submitted.

     

    I'd suggest a combobox in this case as you'll be able to select multiple choices.

     

    I hope this is helpful for you.

  • syasmin25 Profile Picture
    51 on at

    Hi, 

    Thank you for the response. I took your advice and switched over to combobox and now even though I can do multiple selections, the field shows blank data in sharepoint. 

    Here is my formula for "Submit" 
    SubmitForm(Form1);If (IsEmpty(Errors(Projects)), Notify("Success", NotificationType.Success); Navigate(Home), Notify(First(Errors(Projects)).Message, NotificationType.Error))

    Is there something missing?


  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @syasmin25 

    First question is - you have marked @anibra 's post as a solution - is this really the solution you used or are you still having a problem?

     

    As for your last response:

    Yes, first, the Submit formula should ONLY be:

    SubmitForm(Form1)

    The Form already does all the error checking you need. 

    So, if you want notices, then put this in the OnSuccess action of your form:

    Notify("Success", NotificationType.Success); Navigate(Home)

    And this, in the OnFailure action:

    Notify(First(Errors(Projects)).Message, NotificationType.Error))

     

    As for the new Combobox, you will need to let me know the following details:

    - The type of field that this in your datasource - I assume it to be text, but want to verify

    - How you want multiple selections shown in your field in the datasource - comma separated??

    - The Default property formula of your Datacard

    - The DefaultSelectedItems property of your Combobox

    - The Items property of your Combobox

    - The Update property of your Datacard

     

    All of the above play an essential role on getting data and saving data.

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 383 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 356

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard