Skip to main content
Apr 13, 2020 5:51 AM UTC
Solved

Can we list Thingworx entities which are created by a specific user in Thingworx ?

Hi All,

 

I just want to list out those entities which are created by a a specific user. Is we have something in Thingworx?

wposner-2Answer
Apr 13, 2020 2:57 PM UTC

If you have direct access to the TWX DB you could create a secondary JDBC connection to it and then write a query on your new DB thing that looks in the public.thing_model table to get you this information.

5 replies

Apr 13, 2020 9:15 AM UTC

Hi,

 

There is no out of the box service for that.

I don't know if it helps, but you can see owner if you export entities in xml format.

 

Raluca Edu

wposner-2Answer
Apr 13, 2020 2:57 PM UTC

If you have direct access to the TWX DB you could create a secondary JDBC connection to it and then write a query on your new DB thing that looks in the public.thing_model table to get you this information.

Apr 20, 2020 6:22 PM UTC

Hi @koushal.

 

If one of the previous responses answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Apr 21, 2020 6:55 AM UTC

Hi,

 

If wan't be super speedy, but you can do as follow:

 

var result = Resources["SearchFunctions"].SearchAll().thingResults;
result.AddField({name: "owner", baseType: "STRING" });
var creator
for each(row in result.rows) {
 try {
 creator = eval(row.parentName)[row.name].GetConfigurationChangeHistory().Find({ changeAction: "CREATE" });
 if (creator!==null) {
 row.owner = creator.user;
 }
 } catch(error) {}
}
Apr 21, 2020 6:56 AM UTC

Sorry, this is to get all entities owner, you just need to filter by the desired user and you are done.