Jump to content

entityBrowseRecords2 for Assets


Recommended Posts

Hello,

I've noticed that some of the fields cannot be used in the method "entityBrowseRecords2".  I've attempting to search for MobileDevices, and have been using the Entity Browser to determine what I can/cant do... and these are the search columns

image.png.9b9c98bce99be61fa5db3cd95cfd1c37.png

However when I run the API (using PowerShell) 

image.png.6013939142ed080738c5d405f74ce51c.png

I get the following results

Quote

fail          The search column 'h_Manufacturer' is not allowed

or

Quote

fail          The search column 'h_Model' is not allowed

Any idea on how I can use these fields in my API calls?  This doesn't just happen with Mobile Devices, but other Assets as well.

(Please Note - The above fields should all be searchable, if defined in my function, at the moment i've just tested it one-by-one)

Please advise.

Link to comment
Share on other sites

Never mind, I have figured it out... the fields are case sensitive.  Changing them all to lowercase (h_Model to h_model, h_Manufacturer to h_manufacturer has worked).

Small things eh? The devil is in the detail

  • Like 1
Link to comment
Share on other sites

@samwoo one thing I would say to be mindful of how search is performed using entity browse.. specifically MatchType in SearchFilter param: https://api.hornbill.com/_types/searchColumnType. So, alongside Column and Value params you can have a third param, MatchType. If you don't specify this param it will assume default value as "wildcard" meaning the searches will be performed using a LIKE operator. E.g. It means "Intel" will match "Intelligent" for example... just FYI

image.png

Link to comment
Share on other sites

Hi @Victor,

Many thanks - I did discover this actually (accidentally) when looking up other Assets.  In the case above thankfully I am just looking up data using specific text rather than abbreviated text, but I have used partial text in other places and had to adjust the MatchType accordingly.

Many thanks - hope you are well.

Samuel

  • Like 1
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...