How to Filter Data from a single schema based on geography | Community
Skip to main content
bhaskarc1289447
Level 3
September 8, 2021
Solved

How to Filter Data from a single schema based on geography

  • September 8, 2021
  • 3 replies
  • 2272 views

Hi All,

I have a product schema with fields -> Product id | Product Description | Product name | Validity | Geography.

We have the product data of all the geographies filled in that schema

Product analysts across multiple geographies uses it. How can I ensure that a Product analyst of a Particular geography can access the products of his geography only (by using query in a wkf) and not see the products of other geography. (Product analyst do not have admin access)

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by DebTr

Hi Deb,

Take 3 geographies - India, Sri lanka and China. You can take the random values for other fields


Hi @bhaskarc1289447 ,

You can create three different named rights(cus:inaccess,cus:slaccess,cus:chaccess) for the geos and assign the named rights to operator groups for the specific geo.

the add the following sysfilter to the schema.

 

<sysFilter>
<condition boolOperator="OR" enabledIf="hasNamedRight('cus:inaccess')=true AND hasNamedRight('admin')=false"
expr="@geo='IN'"/>
<condition boolOperator="OR" enabledIf="hasNamedRight('cus:slaccess')=true AND hasNamedRight('admin')=false"
expr="@geo='SL'"/>
<condition boolOperator="OR" enabledIf="hasNamedRight('cus:chaccess')=true AND hasNamedRight('admin')=false"
expr="@geo='CH'"/>
<sysFilter>

 

Cheers,

Deb

3 replies

Level 6
September 8, 2021

Hi @bhaskarc1289447 ,

You can achieve this using sysfilters.

 

Cheers,

Deb

bhaskarc1289447
Level 3
September 8, 2021

Hi Deb,

Thank you for reply. Can you help me out with how should we set up the 'sysfilter' for this requirement.

Level 6
September 8, 2021

Sure.

May I know, how many possible values are there in geography schema and some samples?

 

Cheers,

Deb

Jyoti_Yadav
Level 8
September 9, 2021

Hi @bhaskarc1289447 ,

 

Your each product analyst would be having access to different folders?

If yes, then you can achieve this by assigning folder-id of particular product based on geography. You need to assign different folder-id to each geography. And same filter you need to assign to Product folder.

 

In this way, you can restrict each product analyst to see only data belonging to particular geograpghy.

 

Thanks,

Jyoti

Sukrity_Wadhwa
Community Manager
Community Manager
September 16, 2021

Hi @bhaskarc1289447,

 

Were you able to resolve this query with the help any of the given solutions or do you still need more help here? Do let us know.

 

Thanks!

Sukrity Wadhwa
bhaskarc1289447
Level 3
September 27, 2021

Yes,

I was able to solve my issue with Deb's solution.

Sukrity_Wadhwa
Community Manager
Community Manager
September 29, 2021

Thanks for the update. 🙂

Sukrity Wadhwa