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 / Dynamically filter com...
Power Apps
Unanswered

Dynamically filter combo box based on parameter

(0) ShareShare
ReportReport
Posted on by 64

Hello! 

 

I'm attempting to build a survey experience in an app that will be embedded within a training course via another tool. Here's where I'm at so far: 

 

  • I've built 1 app with 8 screens - 1 screen for each module. On each screen, there is a form with 5 questions. First is a combo box that is filtered to the course options available for that specific module. and then the rest of the survey questions are the same for each screen. 
  • I set parameters on the app's OnStart for each of the individual modules so in my other tool, we'll give users 1 of 8 links, taking them directly to the appropriate module with the appropriate course options.

However, if/when my survey questions change, I don't want to have to update each screen individually to account for the updates, so I think I would like to instead have 1 screen with 1 form. But I still want to somehow use that parameter to set the module and then populate the appropriate list of courses when the user accesses the app. Any suggestions? Am I overthinking or overcomplicating things? Appreciate any and all help!

Categories:
  • cwebb365 Profile Picture
    3,334 Most Valuable Professional on at

    You can just use some variables when the app / screen loads up using Switch function: If and Switch functions in Power Apps - Power Platform | Microsoft Learn 

     

    And you can have a different filter based on the parameter passed in. Or build a collection that you use based on the parameter. So if you have say a surveyID you pass in. You could have this that builds a collection. 

     

    ClearCollect(colSurvey, Filter('datasource', SurveyID = Param("Yourparam")) 

     

    But there is a bunch of ways to do it, but essentially you're filter can just include your parameter to change the survey dynamically. 

     

    Hard to tell based on your description, but if the screen's are the same, and you just pass a value when saving, you could also just save the Param("value"); as part of the column you need to write back as well. Just depends, but you could def. use one screen if they are the same and just base something off the param. 

  • JennC26 Profile Picture
    64 on at

    Thanks for the reply - You helped me think it through and I figured out a solution that checks all the boxes! 

     

    I ended up consolidating to 1 screen. I'm now using the ModuleID field in my list to dynamically create my parameter and set the screen header.

     

    App OnStart: 

    Set(varModuleID, Value(Param("moduleid")));
    If(varModuleID <> 0, Set(varSurveyName, LookUp(L2Courses, L2ModuleID=varModuleID)));

     

    Then my combo box filters my courses where the ModuleID matches the Variable:

     

    Items:

    Filter(L2Courses, L2ModuleID=varModuleID)

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard