Expand my Community achievements bar.

SOLVED

How to Filter Data from a single schema based on geography

Avatar

Level 3

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)

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

9 Replies

Avatar

Community Advisor

Hi @bhaskarc1289447 ,

You can achieve this using sysfilters.

 

Cheers,

Deb

Avatar

Level 3

Hi Deb,

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

Avatar

Community Advisor

Sure.

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

 

Cheers,

Deb

Avatar

Level 3

Hi Deb,

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

Avatar

Correct answer by
Community Advisor

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

Avatar

Community Advisor

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.

Jyoti_Y_0-1631147942248.png

 

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

 

Thanks,

Jyoti

Avatar

Administrator

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