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 / Help With Separator
Power Apps
Answered

Help With Separator

(0) ShareShare
ReportReport
Posted on by 185

I have the following code which filter a SharePoint list and look up the data. 

 

With({_dataForSecondDD: Choices(AccountCreationList.'Client''s Floor Number:')},
 ForAll(Choices(AccountCreationList.'Client''s Work Address:') As _choice,
 {Value: _choice.Value,
 Items: 
 Switch(_choice.Value,
 "56 Wood ST", Filter(_dataForSecondDD, Value in "8th floor 9th floor 12th floor"),

 "59 Main Street", Filter(_dataForSecondDD, Value in "34th floor, 35th floor, 36th floor, 37th floor"),

 

 _dataForSecondDD
 )
 }
 )
)

 Currently the code is separating the numbers for example: 34th floor is showing as 4th floor. Is there a way to separate this to show 34th floor etc?

 

This is resolve on a another post:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Hide-Dropdown-Fields-Based-On-a-Selection/m-p/1787804#M453391

Categories:
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @knishal 

    Yes, the key is to get it specific by providing a separator around it.

    The formula would become:

    With({_dataForSecondDD: Choices(AccountCreationList.'Client''s Floor Number:')},
     ForAll(Choices(AccountCreationList.'Client''s Work Address:') As _choice,
     {Value: _choice.Value,
     Items: 
     Switch(_choice.Value,
     "56 Wood ST", Filter(_dataForSecondDD, "|" & Value & "|" in "|8th floor|9th floor|12th floor|"),
    
     "59 Main Street", Filter(_dataForSecondDD, "|" & Value & "|" in "|34th floor|35th floor|36th floor|37th floor"), 
    
     _dataForSecondDD
     )
     }
     )
    )

     

    This will enforce that you are really matching |34th floor| against |34th floor|

  • knishal Profile Picture
    185 on at

    @RandyHayes  thank you so much. It works. Do you know why I am unable to add hint text after adding this formula and unable to search the dropdown? 

  • knishal Profile Picture
    185 on at

    @RandyHayes update: I was able to turn on the search combox. Still Need help with the hint text 

  • Verified answer
    knishal Profile Picture
    185 on at

    This is resolved, just needed to turn on allow search. 

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 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard