Query Business Rule to restrict visibility on hardware asset table based on login user location
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 12:49 AM
Hi,
Could you please guide here, i wanted to restrict the visibility on hardware asset table based on user login location. user can only see their location assets. for this i have written before business query but not impacted.
Could guide here pls.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 05:03 AM
Hello @fareedashaik,
Checking based on a very specific location may not fetch you any result.
You may like to match the region or city or country of the user and your Hardware Asset location. NOT the exact location. That may not match exactly.
This is based on my assumption on how you have configured your location table. Assuming that you have store very granular location.
Kind Regards,
Swarnadeep Nandy

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 07:55 AM
@fareedashaik Update your code as follows.
if(gs.isInteractive()){
current.addQuery("location",gs.getUser().getLocation());
}
Hope this helps.