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 / When choosing a main c...
Power Apps
Unanswered

When choosing a main category, it will show its all subcategory.

(1) ShareShare
ReportReport
Posted on by 28
I have made two table in Dataverse.
 
1 contain all the data and another contain main category and subcategories only. Take below table as a reference.
 
Name Category Subcategory
Niko Animal Cat
YAMAHA Ride Bike
 
Category Subcategory 
Animal Cat
Animal Dog
Ride Bike
Ride Car
 
While entering main category I want all the data for subcategory. in drop down.
 
 
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,978 Moderator on at
    Hi
     
    Let’s pretend you have a drop-down for main categories called MainDropdown
     
    lets say you have another dropdown for sub category called Subdropdown 
     
    In the Items property of Subdropdown put
     
    Filter(CategoryTalbleName, MainCategory = MainDropdown.Selected)
     
    and now subcategory will only have the associated sub categories for the main selected 
     
     
  • SoPatt Profile Picture
    Microsoft Employee on at
    I'm assuming you want to do this in Power Apps based on where the question is posted.
     
    I'm not quite clear on what you're asking. I think you're saying want to have category in one dropdown and then subcategory in another. Are you trying to generate items in the first table?
     
    Assuming that, I'm calling the first table "ThingsInCategories" and the second table "Category_Subcategory". I created the below UI with two dropdowns, a text input, a button, and a gallery that shows all the items in ThingsInCategories.
    For the Category dropdown (ddlCategory), here is the Items property: 
    Distinct(Category_Subcategory,Category)
    For the Subcategory dropdown (ddlSubcategory), here is the Items property:
    Filter(Category_Subcategory,Category=ddlCategory.SelectedText.Value)
    For the Add button, here is the OnSelect property: 
    Patch(ThingsInCategories,
        Defaults(ThingsInCategories),
        {
            Name: txtName.Text,
            Category: ddlCategory.SelectedText.Value,
            Subcategory: ddlSubcategory.SelectedText.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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 1,027

#2
Valantis Profile Picture

Valantis 644

#3
11manish Profile Picture

11manish 626

Last 30 days Overall leaderboard