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 / dynamic data referance...
Power Apps
Answered

dynamic data referance for a dropdown/combobox baseed on a previous selection

(0) ShareShare
ReportReport
Posted on by 46

I'm experimenting with a master datalist that has all the data for my dropdowns in different columns so I can dynamically retroactively change that data on the fly now  
such that one form can be used to cross-reference across multiple different departments 
the master list is 'additional information' and is a SharePoint list 

 

much like a branching decision tree I would like to Change the values of dropdowns further down the chain

 

something like below, where the default return is the list of departments again 'additional information'.'title'

Switch(
 departDROP.SelectedText.Title, 
 "referancetext1",
 'Additional Information'.'column1',
 "referancetext2",
 'Additional Information'.'column2',
 "referanvetext3",
 'Additional Information'.'column3',
 "referancetext4",
 'Additional Information'.'column4',
 'Additional Information'.'Title'
)

I have a "department" dropdown -> now based on the department I want to change the options of my sub-department dropdown

 

for example if I select HR for my department,  I would like to only show the relevant sub departments  personnel, billing , inquiries 

 

all of those options are stored in additional information in a column labeled 'HR-subdepart' as text 

Switch(
 departDROP.SelectedText.Title, 
 "HR",
 'Additional Information'.'HR-supdepart',
 "referancetext2",
 'Additional Information'.'column2',
 "referanvetext3",
 'Additional Information'.'column3',
 "referancetext4",
 'Additional Information'.'column4',
 'Additional Information'.'Title'
)

this code doesn't error, once completed of course,(just trying to make this as generic as possible)
however is warns 

"Warning: the columns produced by this rule are all nested tables and or records, however the property expects at least some columns of simple values (such as text or numbers)."

and my dropdown functions but has nothing in it see image.

 

I'm attempting to use this one form to handle the data from multiple department  by limiting the possible inputs based on the structure of decision trees (hopefully that made sense)

any help would be appreciated 

image.png
Categories:
  • Verified answer
    Daniel48 Profile Picture
    46 on at

    I solved this issue using a combobox instead of a dropdown and changing my code block to look like this.

    Switch(
     departDROP.SelectedText.Title, 
     "HR",
     distinct('Additional Information','column1'),
     "referancetext2",
     distinct('Additional Information','column2'),
     "referanvetext3",
     distinct('Additional Information','column3'),
     "referancetext4",
     distinct('Additional Information','column4'),
     ["null"]
    )
  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    HI @Daniel48,

    Thanks for your sharing.

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 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard