Need to add some filter conditions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 02:34 AM
Hi All,
I need to add some filter conditions to one of the field that is "Hardware asset" and it is referring to alm_hardware table.
Filter conditions: Model category is computer and Model is not Virtual and assets state is In use or In stock.
I have added some filter condition like this:
asset.query('model!=307716f5db30605042e8d2e3ca9619ce^model_category=81feb9c137101000deeabfc8bcbe5dc4^install_status=1^ORinstall_status=6');
But I am getting other assets also,
Please any one provide me the inputs,
Thanks in advance,
Vinuth

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 02:41 AM
Hi asset.query('model!=307716f5db30605042e8d2e3ca9619ce^model_category=81feb9c137101000deeabfc8bcbe5dc4^install_status=1^ORinstall_status=6');
replace to
asset.addEncodedQuery('model!=307716f5db30605042e8d2e3ca9619ce^model_category=81feb9c137101000deeabfc8bcbe5dc4^install_status=1^ORinstall_status=6'); //you need to use encoded query here
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2023 03:52 AM
Hello,
Instead of asset.query('<your_query>') use asset.addEncodedQuery('<your_query>');
Please mark this response as correct or helpful if it assisted you with your question.
Regards,
Nitesh