How to create Dataset from tags?

Yes, but your change in the def line broke it. The comment in the sample code for tagFolder indicates what the caller should supply.

Uhm, not sure what you mean. Should i not have the tagfolder in this line?
def getDatasetFromArrayTags([default]Brewfather_OPCUA):

No. That comes from the caller.

{ Seems to me you need to go through some python scripting basics. }

Sure, i'll could use some basic Python scripting...

I think the 1 and 2 arg is right? But I dont get the purpose of the 3.?

Supply the tag folder string.

Of course, that makes sence, thanks, but i'll get this error.

You have enclosed your tag folder path in curly braces, which makes the expression attempt to read the path's value. You need to pass a string. If a constant, put it in quotes. If you have the string in a property, put the path to the property in curly braces.

{ Seems to me you need to go through some Ignition expression binding training. }

I'll stop here until I hear from you that you've completed IU.

I'll tried with quote also, but still error.

I have done some of the IU training, but I will do a lot more for sure.


Is there something wrong with script you made? Do I need to change anything but the columnTags?

Could be. Call it from the designer script console.

Thanks. How can I pass the tagfolder path to the script console?

And yes, I am reading articles and watching the videos on IU trying to understand this, but I'm really stuck here..

Don't put the sample code in the script console. Call the function from script console. One line:

ds = BrewfatherDatasetDropdown.getDatasetFromArrayTags("[default]Brewfather_OPCUA")

This will produce a more complete error for you (us) to see.

Have you saved the project since you created that script?

{ Please post errors as copy and pasted text, not screenshots. Use the "preformatted text" button in the forum comment editor to keep it neat. }

Yes, but I updated my comment above since I have changed the name of the script from "BrewfatherDatasetDropdown" to "BrewfatherDataset".

This is the correct error:

Traceback (most recent call last):
File "", line 1, in
File "module:BrewfatherDataset", line 9, in getDatasetFromArrayTags
AttributeError: 'com.inductiveautomation.ignition.designer.gui.tool' object has no attribute 'toDataSet'

Replace system.tag.toDataSet with system.dataset.toDataSet.

{ I'm unavailable for the next few hours. The community might help. }

Thank so much, again! Now its working :slight_smile:

One more thing, is there a simple way to not list the values if value is "-1" or "Ingen"? If not, I can manipulate the strings in PLC, but It would be nice if possible in ignition :slight_smile: