So in one of my scripts, using Python, I created a variable called engUnits that is a dataset, and it holds the units used (first image).
What I wanted to know or what I was having trouble with was trying to use that data set that I created solely on my script to be used as the options to select in my drop down menu/list component. The second image shows my attempt in trying to insert my dataset I created into my drop down component but I was unsuccessful.
Thank you in advance, I greatly appreciate anyone’s help!!
If you’re making a dataset from scratch with system.dataset.toDataSet() then it requires two arguments, headers and the data. I am assuming that your engUnits are the headers. So should look more like
I also wanted to mention that my dataset update or dynamically updates based on what was used. So it can be more than 3 inside the dataset. And as the dataset changes, I wanted the drop down component to update as well.
Just wanted to point out that this [u'PSIG',u'',u'F'] isn't a dataset, it is a list.
To create a dataset, you need to make a list of headers and a list of data. For it to work with the dropdown, you need have specific headers as expected by the component. If you look at the data property of a fresh dropdown component you can find what is needed.
Just to clarify, my engUnits data is not my headers but the values that I wanted to appear in my dropdown. I think I was able to now create it into a dataset with this.
The output was: Dataset [3RR ? 2C]
Does this mean I was able to successfully complete it into a data set? Again, thank you all for the help!
Thank you guys!! I was able to successfully update my Drop Down dynamically! Im grateful for the help and this community. I really appreciate it @lrose and @PGriffith !!!