Skip to main content
1-Visitor
April 13, 2020
Solved

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

  • April 13, 2020
  • 5 replies
  • 1858 views

Hi All,

 

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

Best answer by wposner-2

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

raluca_edu
17-Peridot
April 13, 2020

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-21-VisitorAnswer
1-Visitor
April 13, 2020

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.

Support
April 20, 2020

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

1-Visitor
April 21, 2020

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) {}
}
1-Visitor
April 21, 2020

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