Display the number of tag folders

hi.
image

I would like to generate the whole number in the database like the picture above. However, I currently generate available numbers but not full numbers.

The way I used it was to sum the numbers in {database.available} using expressions.

How to generate a whole number?

I thought I could just add the number of database/* folders in the system tag. But failed to implement it.

You're showing a screenshot of the number of databases and the number connected, but you're asking how to display the number of "tag folders"? These are completely unrelated to each other; can you explain exactly what you're after?

I think he's talking about tag folders because he wanted the number of folders in the [system]Gateway/Database folder.
Classic x/y problem.

use this instead:

system.db.getConnections().getRowCount()
4 Likes

correct. i want to show the number of databases.

However, since I don't know how to do it, I wondered if it would be okay to do it with the number of tag folders.

It's sometimes better to ask how to achieve an end goal, rather than try to ask how to do something specific without giving any context. It leads to better understanding from our perspective, and usually better outcomes for you since we know what you're trying to do, and possibly if you're coming at it from the wrong direction

2 Likes

Where should I use this? This cannot be used in expressions.

It's python code, so no, it won't work in the expression language. You'll need to add it into a script transform if you want to run it from a client.

  1. Create an expression binding, put 1 into the expression (we don't care about the expression)
  2. Add a Script Transform
  3. Add return system.db.getConnections().getRowCount()
1 Like

It works very well!

Great, but you should give the solution to @pascal.fragnoud as he provided the contents of the solution :slight_smile:

2 Likes