Jump to content

Included relatedEntityData in entityBrowseRecords2


Recommended Posts

Hello,

Will it ever be possible to included relatedEntityData using entityBrowseRecords2?  I'm using PowerShell and struggling to find the best way to combine individual information from the Assets Table and Assets Computer Table.  Having relateEntityData would help alleviate that.

Any thought's?

Thanks,

Samuel

Link to comment
Share on other sites

Hi @samwoo,

Rather than entityBrowseRecords2, you'd be best off using a stored query and the data::queryExec API to get at that information. Open up the assets list in your browser, and open up the Network console, and look at the calls to data::queryExec, specifically those that use the getAssetsListByClass query. Every time you filter the list (by asset class and/or text filtering) you should see 2 calls to that query, one to get a count and one to get the record data. This will be more efficient than us adding relatedEntityData to entityBrowseRecords2, and allows for proper pagination of the resultset.

image.png

Cheers,

Steve

Link to comment
Share on other sites

Hi again @Steve G,

I remember why I didn't use that method, because I had no idea what queryNames are available - but now checking in the browser's console when doing something on the system, it now makes more sense about what's going on.  I am just wondering... are the queryNames documented anywhere? 

Anyway that worked, and is perfect... exactly what I was looking for... and surprisingly quick at returning result :O

Thanks!

Samuel

Link to comment
Share on other sites

Hi @samwoo,

Glad it's working for you! 

The queries are not documented as they are really just for Hornbill developers to use I'm afraid, but there's no reason why you can't use those that you spot being called directly from the UI ;) 

Cheers,

Steve

Link to comment
Share on other sites

Just now, Steve G said:

Hi @samwoo,

Glad it's working for you! 

The queries are not documented as they are really just for Hornbill developers to use I'm afraid, but there's no reason why you can't use those that you spot being called directly from the UI ;) 

Cheers,

Steve

I thought that might be the case - thanks man you have been a great help - I've learnt from the best :D

Have a good weekend!

Samuel

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...