06-27-2019 09:40 AM
Hi,
Is there a way to narrow down the big drop down selection based on other drop down selection?, I have 5 drop down menu's, lets say A,B,C,D and E is big drop down. I am looking for a way to narrow down the 'E' based on 'A','B','C','D' selection.
The value's or entries in E, i wrote them in .SUD file.
for example: "3029-F4-HD-RWNS-X-JK" , is one of the entry in drop down 'E'. the functionality i am aiming for is,
on selection of Drop down 'A', it should narrow down the drop down selection of 'E', containing R at that specific position
similarly with other 3 drop downs,
Drop down B should interact with letter W
Drop down C should interact with letter N
Drop down D should interact with letter S
Can we accomplish this using regular expressions?
Thanks in advance.
07-08-2019 05:51 PM
Hi Kandukuri_raghavendra,
I'm going to assume that you're not using "G" or "A" type enumeration variables, declared in a *.VAS file, and attached to each pull-down control. In that case you would need to manipulate the variable contents.
Assuming that your're using list box controls that have items added programmatically to a static list, then you just need to add code to the "EventChange()" callback of each A,B,C,D list box that manipulates the values of the large E list box. You could indeed use regular expressions, or you could use the Split() function to tokenize the string you want to analyze into an array, from which you can easily index out each element between the "-" characters.
Brad Turpin
DIAdem Product Support Engineer
National Instrumetns