Return all tags inside a folder to a dataset

I want to write a script to return all the tags in a specific tag folder and store them in a dataset. All I require is a dataset with only 1 column that contains the full tag name, e.g. “Root/Folder1/Folder2/tagname”, the number of rows in the dataset should be the same as the number of tags found in the folder. This is required so I can pass that dataset into a template repeater’s Template Parameters.
Does anyone know how to do this?

tags = system.tag.browseTags(parentPath="yourfolderpathhere")
tagDS = []
for tag in tags:
	tagDS.append([tag.fullPath])

If called in the gateway scope, a tag provider must be specified. The tag provider is included in the full path that is being appended to the dataset, so if you dont need it you would need to strip it out before putting it in the dataset.

To add to diat150’s code, convert the list of lists to a dataset:

[code]
tags = system.tag.browseTags(parentPath=“yourfolderpathhere”)
tagDS = []
for tag in tags:
tagDS.append([tag.fullPath]

tagDS = system.dataset.toDataSet([“Tags”],tagDS)
[/code]Best,