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 / 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:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,297 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

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard