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 / Change Values ​​in Dat...
Power Apps
Answered

Change Values ​​in DataCardValue2 based on selected values ​​from DataCardValue1

(0) ShareShare
ReportReport
Posted on by 22

hi guys,

I have two fields - DataCardValue1 and DataCardValue2.
They are basically dropdown menus that PowerApps generated for me based on a SharePoint sheet.

Please, I need to make a condition: If the Zariadenie is equal to MC 1, I want only options 6-14 and 14-22 to appear in the Zmena field. I don't want the possibility of 22-6 to appear.
PowerApps_2.pngPowerApps_3.png

How can I do something like this please? Thank u very much 🙂

Categories:
  • Verified answer
    Devvj Profile Picture
    1,132 Super User 2024 Season 1 on at

    Hi @Simon29 

    You can base the second list of a self created table instead, and use a variable as source for dropdown number 2.
    Then you can use this code in the OnChange property of dropdown1 to set the values in Dropdown2

    Switch(
     Dropdown1.Selected.Value,
     "MC 1",
     Set(
     varChoices,
     [
     "6 - 14",
     "14 - 22"
     ]
     ),
     "MC 2",
     Set(
     varChoices,
     [
     "22 - 06"
     ]
     )
    )

     

    Set the item property on dropdown2 to the variable name "varChoices" to make it work.

     

    An alternative thats more robust would be to set up a new list in SharePoint where all records holds the relation between the to tables.

    2 column, 1 text and 1 choice, where the text is for example "MC 1" and the choice field have just the values you want shown in the dropdown.
    And then simply filter the second dropdown based on that list instead.

     

    -------------------------------------------------------------------------
    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.

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
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard