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 / Dropdown values based ...
Power Apps
Answered

Dropdown values based on "startswith" another datacard value

(0) ShareShare
ReportReport
Posted on by 43

I have a simple SharePoint list with 3 columns, ACTIVITY, ACTIVITY DETAIL and QTY.  Activity and Activity Detail have drop down values to choose from.  I have created a PowerApp for mobile users to quickly add items into the list.  However, the ACTIVITY DETAIL list of values is rather long, and they have to scroll quite a bit to find values as there are over 40.  However, there are only 4 values in ACTIVITY.  ACTIVITY DETAIL is essentially based on the ACTIVITY and actually start with that value.  Here are some examples of my values.

 

ACTIVITY      ACTIVITY DETAIL

Unload          Unload Cart

Unload          Unload Boxes

Unload          Unload Pallet

Ship               Ship Glass

Ship               Ship Wood

 

What I would like in the power app, if I choose my Activity = Unload that the only values that I would see in my Activity Detail dropdown would be Unload Cart, Unload Boxes, Unload Pallet.  That is it.  Activity Detail has to start with Unload.  Same with Ship.  If I choose Ship, I only want to see Ship Glass, Ship Wood in my Activity Detail drop down.  For refence my datacard value for ACTIVITY is DataCardValue6 and ACTIVITY DETAIL is DataCardValue7.  Here are some options I have tried to get it to work but I have syntax errors.  Any help in pointing me in the right direction is greatly appreciated!

 

None of these work for DataCardValue7

Filter(([@'Cost Saving Activities'].ActivityDetail), StartsWith(([@'Cost Saving Activities'].Activity), Dropdown1.Selected.Value)).

Filter(([@'Cost Saving Activities'].ActivityDetail), StartsWith(([@'Cost Saving Activities'].Activity, DataCardValue6.Selected.Value))
Choices(([@'Cost Saving Activities'].ActivityDetail), StartsWith(([@'Cost Saving Activities'].Activity, DataCardValue6.Selected.Value))
Filter(([@'Cost Saving Activities'].ActivityDetail), StartsWith(DataCardValue6.Selected.Value))

 

98911_0-1716929267086.png

 

Categories:
I have the same question (0)
  • subsguts Profile Picture
    1,259 Moderator on at

    I see no one has answered on this, so I thought I would at least throw out an example that works in my code.  I have a cmbSpecialtyNM combo box and a cmbSubSpecialtyNM combo box.  The cmbSubSpecialtyNM depends on what is chosen in the cmbSpecialtyNM.  Note:  That they both pull from the same SharePoint list.

     

    Below is the code it the items for each one.  I hope this helps.

     

    Items for the cmbSpecialtyNM:  Distinct(ReferenceSpecialtyBASE,SpecialtyNM)

     

    Items for the Sub-Specialty Combo: Filter(ReferenceSpecialtyBASE, SpecialtyNM = cmbSpecialtyNM.Selected.Value)

     

    I believe you should be able to modified this second items to use the StartsWith instead of the "=" I am using.

     

    Here is what the cmbSubSpecialtyNM looks like as well.  It's important the Primary Text and the SearchField are set up to be the filed you want.  In addition you need to have Allow Searching turned on:

    subsguts_0-1716935004704.png

     

    Just so you have the full picture, here is what the combo box for the Specialty looks like as well:

    subsguts_1-1716935136733.png

     

    Again, I hope this helps.

     

  • 98-911 Profile Picture
    43 on at

    Hi @subsguts 

     

    Thank you for jumping in!  I have the fields searchable, however when I try to change the data primary text and search field for my DataCardValue7 - equivalent to your cmbSubSpecialtyNM, I don't have the option to choose anything other than Value.  I must be missing something.  Any idea's?

     

    98911_0-1717010101266.png

     

  • subsguts Profile Picture
    1,259 Moderator on at

    What is the code in the Items properties for each of your combo boxes?

  • 98-911 Profile Picture
    43 on at

    98911_0-1717010574874.png

     

  • Verified answer
    subsguts Profile Picture
    1,259 Moderator on at

    This should be in the Items of the ActivityDetail combo box.  The other one should remain the same.  

     

    Filter(Choices([@'Cost Saving Activities'].ActivityDetail),StartsWith(Value,cmbActivity.Selected.Value))

     

    This worked for me, using my own table, so barring any typos this should work for you too 🙂

  • 98-911 Profile Picture
    43 on at

    Bingo!  That worked!  Thank you!!!  Well, I did have to change one thing from what you gave me as I am not very good about renaming my combo boxes, leaving them as default naming.  😁  I just changed cmbActivity to DataCardValue6.  Here is what worked for me.  Again, thank you very very much!!

     

    Filter(Choices([@'Cost Saving Activities'].ActivityDetail),StartsWith(Value,DataCardValue6.Selected.Value))

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 379 Most Valuable Professional

#2
11manish Profile Picture

11manish 203 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard