Populate list control with filter data label

  • 11 October 2022
  • 4 replies
  • 3 views

we have a sql table to use for drop down list



we select an item from drop down, and pass the value to a data label.



then we want to filter the drop down list with the data label to show remaining entries



 



currently i perform the following



when drop down changed - transfer drop down into data label



transfer blank into drop down list (to clear entry selected)



then populate list control and filter with value not equals to data label



 



this isn't working



what is the best method?



i will need to perform this up to 4 times, so potentially needed to filter the drop down list with 4 data labels


4 replies

Two things.



 



Are you clearing the value of the data label when you clear the drop down list, thus removing your subsequent filter?



 



Having a control operate in this way, is not the normal way a drop down control works. For a user, having two separate drop down controls may provide a more logical experience.

Hi @braddo ,



 



This is an interesting one 🙂.



 



It is quite doable, though I would probably approach it in a more user-friendly way. This is what I did:



 



I have a SmartObject-bound Dropdown List as well as 4 x Data Labels on my View.



 



On the change of the DDL, I determine which Data Label to populate with the value of the DDL based on which control has already been populated:



 





Then on each individual Data Label I have an OnChange event to filter out the values of each:



 





In the configuration you increase the "not equals" filters based on which Data Label you are, so first data label will have filter for Value not equals Datalabel 1, second will then compound to Value not equals Data Label 1 and Value not equals Data Label 2, and so on...



 





 



Works a charm if you test it:



 





 



Let me know if you have any questions.



 



Cheers,



Ernie



 

thanks, i will have to try it, my current setup is as follows





 

i'm not clearing the data label

Reply