achen1 Posted July 26 Share Posted July 26 At the moment I have this dropdown list that shows ALL unique values from the 'process_attribute' column of a datatable as selectable options. I can't figure out how to make my dropdown list ONLY SHOW the values that have not been filtered out. So I need my dropdown list to dynamically change based on the filters I apply to the datatable. Example: This is my starting datatable with no filters process_attribute A B C Let's say I apply a filter to my datatable so that Im only left with A and B (row C was eliminated based on my filters). My dropdown list should only propose values A and B. Currently its still proposing value C even though 'C' has been filtered out already. I can't find a way to do this, someone has an idea? Link to comment Share on other sites More sharing options...
Steve Phillips 3 Posted July 26 Share Posted July 26 I don't know how to do that based on filters, but I have done this with multiple dropdowns. You can use one dropdown to select unique values of "Group1". Then, you can use a calculated variable to say: case when Group1 = DocumentProperty("Grp1") then Group2 end. Then, you can add a second dropdown called Grp2 that shows the unique values of Group2. Obviously, this gets complicated when multiple fields are being filtered on though. Link to comment Share on other sites More sharing options...
achen1 Posted July 26 Author Share Posted July 26 1 hour ago, Steve Phillips 3 said: I don't know how to do that based on filters, but I have done this with multiple dropdowns. You can use one dropdown to select unique values of "Group1". Then, you can use a calculated variable to say: case when Group1 = DocumentProperty("Grp1") then Group2 end. Then, you can add a second dropdown called Grp2 that shows the unique values of Group2. Obviously, this gets complicated when multiple fields are being filtered on though. How/ where do I create the calculated variable: "case when Group1 = DocumentProperty("Grp1") then Group2 end" Does this variable get applied to the "limit data using expression" part of the datatable? Link to comment Share on other sites More sharing options...
Solution David Boot-Olazabal Posted July 29 Solution Share Posted July 29 Hi there, The solution Steve is talking about, is cascading prompts. You can find the way to set up these cascading prompts in this Dr. Spotfire video: Kind regards, David Link to comment Share on other sites More sharing options...
Vanessa Virginia Sucre Gonzalez Posted July 29 Share Posted July 29 Hi @achen1 You'll have to create a calculated column with the filtered values, and use that one for your combobox. You'll need some scripting, both IronPython and Javascript. I made a quick example for you :) you have a Region List that filters the Country Name Combobox. If you have any questions please let me know! filtered Combobox.dxp Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now