# Is there a way to sort with system.tag.browse?

**URL:** <https://forum.inductiveautomation.com/t/is-there-a-way-to-sort-with-system-tag-browse/31823>\
**Category:** Ignition Early Access\
**Created:** [January 31, 2020, 4:43pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-sort-with-system-tag-browse/31823 "2020-01-31T16:43:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![levi.jacobs](https://avatars.discourse-cdn.com/v4/letter/l/dec6dc/32.png) [@levi.jacobs](https://forum.inductiveautomation.com/u/levi.jacobs)\
**Post date:** [January 31, 2020, 4:43pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-sort-with-system-tag-browse/31823/1 "2020-01-31T16:43:21Z")

</div>

Is there a built in way to have the system.tag.browse function sort by tag path, like there was with system.tag.browseTags?

I’m on 8.0.6

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [January 31, 2020, 5:21pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-sort-with-system-tag-browse/31823/2 "2020-01-31T17:21:20Z")

</div>

I don’t see any sort options on [system.tag.browse](https://docs.inductiveautomation.com/display/DOC80/system.tag.browse), however the natural results have always been sorted by ascending `fullPath` when I’ve used it. For example. this recursive browse lists all opc and memory tags in ascending order:

```auto
def browseForTags(path, valueSources):
	'''Return tag paths of the specified valueSource type(s).'''
	
	# Call the browse function.
	results = system.tag.browse(path, {})
	 
	# Loop through every item in the results.
	for result in results.getResults():
		# If result has children, call the function to repeat the process, starting at the child.
		if result['hasChildren']:
			browseForTags(result['fullPath'], valueSources)
		elif result['valueSource'] in valueSources:
			tags.append(result)
         
# Create an empty list to be filled with tag paths.
tags = []
# Set parameters & call function.
path = '[default]' # Replace with root path of UDT/folder to browse.
valueSources = ['opc', 'memory']
browseForTags(path, valueSources)
# Print results.
for tag in tags:
	print tag

```
