Skip to main content
bhaskarc1289447
Level 3
Sep 8, 2021 5:31 AM UTC
Solved

How to Filter Data from a single schema based on geography

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.
DebTrAccepted solution
Level 6
Sep 9, 2021 7:40 AM UTC

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

9 replies

Level 6
Sep 8, 2021 8:28 AM UTC

Hi @bhaskarc1289447 ,

You can achieve this using sysfilters.

 

Cheers,

Deb

Translate
bhaskarc1289447
Level 3
Sep 8, 2021 8:43 AM UTC

Hi Deb,

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

Translate
Level 6
Sep 8, 2021 8:49 AM UTC

Sure.

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

 

Cheers,

Deb

Translate
Jyoti_Yadav
Level 8
Sep 9, 2021 12:42 AM UTC

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

Translate
Sukrity_Wadhwa
Level 4
Sep 16, 2021 1:19 PM UTC

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!

Translate
Sukrity Wadhwa
bhaskarc1289447
Level 3
Sep 27, 2021 1:01 PM UTC

Yes,

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

Translate
Sukrity_Wadhwa
Level 4
Sep 29, 2021 9:49 AM UTC

Thanks for the update. 🙂

Translate
Sukrity Wadhwa