Skip to main content
1-Visitor
February 27, 2020
Solved

Filtering the Asset List by custom property

  • February 27, 2020
  • 2 replies
  • 1645 views

Hello,

 

I'm trying to filter the asset list of the asset advisor page following the information located at https://support.ptc.com/help/thingworx_apps/r8.5/en/#page/thingworx_apps%2FThingWorxAppsCust%2Fcustomizing_the_asset_list_filtering.html%23

 

I was able to successfully filter the assets by name following the example and now I wanted to filter them by my custom properties. I created the "Visible" property (BOOLEAN/STRING) on the Assets and tried to customize the AssetAdvisorPreFilter service in PTC.SCA.SCO.CustomActionHandler this way:

var result = {"filters": [{"fieldName":"Visible","type":"EQ","value":"true"}]};

but it is not working at all.

 

Could anybody help me with how the property should be configured and on the correct result statement??

 

Thanks in advance.

Best answer by abhkumar_274615

Hi @Iker 

 

Your query has answered through the community post.

https://community.ptc.com/t5/Manufacturing-Apps/Customizing-the-Asset-Filter-List/m-p/656585#M1773

 

If the above community answered your question, please mark above post solution as Accepted Solution for the benefit of others with the same question.

 

Thanks

Abhishek

2 replies

22-Sapphire I
March 13, 2020

You can try it without the " " around true to make it a boolean vs. string. If the Visible property is a boolean.

If that dooesn't work then likely when assets are retrieved, it doesn't include the Property you are filtering on, so the Visible field you are trying to filter on is not available.

It may only have the base ISA 95 Template properties available to filter on.

(I'd check this but I don't have a setup handy)

5-Regular Member
March 26, 2020

Hi @Iker 

 

Your query has answered through the community post.

https://community.ptc.com/t5/Manufacturing-Apps/Customizing-the-Asset-Filter-List/m-p/656585#M1773

 

If the above community answered your question, please mark above post solution as Accepted Solution for the benefit of others with the same question.

 

Thanks

Abhishek