Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Display Choices in Dropdown Control that Starts with specified characters

Posted on by 10

[Power Apps Form]
Hello! Is there any way to display choices in dropdown control that starts with specified values/character?

For example, the choices in my dropdown are:
2021000001
2021000002
.
.
.
2022000001
2022000002
2022000003
.
.
and so on.

In my dropdown control, I only want those that starts with 2022 to appear in the choices.
Is there any way to combine Choices(), filter() and starts with() in the formula bar? Or how should it be achieved without deleting the 2021 in the data source?

Thank you!

Categories:
  • LaraDanicaLim Profile Picture
    LaraDanicaLim 10 on at
    Re: Display Choices in Dropdown Control that Starts with specified characters

    @WarrenBelz , that worked! Great! Thanks a lot! Happy New Year! :))

    LaraDanicaLim_0-1672721954294.png

     

  • Verified answer
    WarrenBelz Profile Picture
    WarrenBelz 143,487 on at
    Re: Display Choices in Dropdown Control that Starts with specified characters

    @LaraDanicaLim ,

    The Items would be

    Filter(
     SPListName,
     StartsWith(
     Title,
     "100"
     )
    ).Title

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • LaraDanicaLim Profile Picture
    LaraDanicaLim 10 on at
    Re: Display Choices in Dropdown Control that Starts with specified characters

    Hi, @WarrenBelz . Say for example I have these as my choices. And I only want to display those that starts with 100. The column name is Title. I have tried the formula but it returns an error.

    LaraDanicaLim_0-1672716223584.png


    In the Advanced Property is this:

    LaraDanicaLim_1-1672716373167.png

     

  • WarrenBelz Profile Picture
    WarrenBelz 143,487 on at
    Re: Display Choices in Dropdown Control that Starts with specified characters

    Hi @LaraDanicaLim ,

    You did not post your current Items of the drop-down, but assuming it is a Choice/Lookup column, you could do this

    Filter(
     Choices(ListName.FieldName),
     StartsWith(
     Value,
     "2022"
     )
    )

    If it is a list name and field name, replace the second line with your current Items.

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,487

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,014

Leaderboard