Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
neerajthakur
Creator III
Creator III

Applying Restriction on Fields

Employee_Data:
Load * Inline [
EMPLOYEEID,EMPLOYEENAME,SALARY,BRANCH
1234,Mukesh,50000,IT
1235,Suresh,60000,IT
1236,Dinesh,70000,Sales
1237,Mahesh,80000,Finance
];

I want for Employeeid 1234 data should come and rest all should be 0 and then I should be able to apply restriction on other columns too, for example

  • for user 1234 and restriction on salary data row should be

1234,Mukesh,0,IT

  • for user 1235 and restriction on salary and branch

1235,Suresh,0,0

  • for user 1237 and no restriction

1237,Mahesh,80000,Finance

Please suggest any way to achieve whether by section access or making some changes in backend.

Thanks & Regards,
Please Accepts as Solution if it solves your query.
Labels (5)
1 Solution

Accepted Solutions
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @neerajthakur 

I suspect the problem that you hit with OMIT is that for the users who had columns omitted the tables that included those columns broke instead of showing zero?

I think what you most likely will want is to combine two different approaches, as the problem with not using OMIT is that whilst you can suppress the values in tables that you create the values can still be found using Search and Selections.

What I would try is creating variables for both Salary and Mobile which return either the field name or a zero:

vSalary
=if(index(lower(OSUser()),'empid1','empid2') > 0, 'SALARY', 0)

vMobile
=if(index(lower(OSUser()),'empid1') > 0, '[Mobile No.]', 0)

You can then use these in expressions and dimensions rather than the field names themselves:

sum($(vSalary))

$(vMobile)

This will fix things from a UI perspective, but as I mentioned you should do an OMIT also, so the values can't be found via the back door.

Hopefully that will sort things for you.

Steve

 

View solution in original post

7 Replies
neerajthakur
Creator III
Creator III
Author

@stevedark @PrashantSangle @sunny_talwar @Thiago_Justen_ @Taoufiq_Zarra Please help.

Thanks & Regards,
Please Accepts as Solution if it solves your query.
vinieme12
Champion III
Champion III

refer this video on "Section Access"

 

https://www.youtube.com/watch?v=XhFJtzdQ_Eg&list=PLYupZqrze4LKkofl2OL6Em_MQd9aXpYqk

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @neerajthakur 

From your description I'm not sure how you are deciding which users get which access.

Section access will allow you to limit users to only see their own rows or departments. You will need to create a section access table that links either the users AD name (client-managed) or email (SaaS) to the rows they should be able to see (based on EMPLOYEEID or BRANCH).

If there are users who should be able to see rows for other users, but no SALARY information you want to look into the OMIT features of section access, which allows you to drop columns instead of rows.

If section access does not provide what you need then you can do things in code, using IF statements. If you go this route you will need to ensure limited users have only analyser access and you disable their access to global search and selections. This could prove tricky to fully secure.

Hope that helps,

Steve

neerajthakur
Creator III
Creator III
Author

I have tried omit function, I don't want to drop the column I just want the value to turn 0, NA, NULL based on restriction. I want rest information of all users to be visible, for example their are 5 users, I want all of them to see EMPID,EMPNAME, for one user I want all information to be available, for other I want mobile no to hide and for one I want to hide mobile no and salary. 

EMPID,EMPNAME,Mobile No. SALARY

1,A,798,999

2,B,897,99999

3,C,456,12345

4,D,321,57689

5,E,123,789889

 

Output for EMPID 1 - All information

EMPID,EMPNAME,Mobile No. SALARY

1,A,798,999

2,B,897,99999

3,C,456,12345

4,D,321,57689

5,E,123,789889

Output for EMPID 2 - Hide Mobile No.

EMPID,EMPNAME,Mobile No. SALARY

1,A,0,999

2,B,0,99999

3,C,0,12345

4,D,0,57689

5,E,0,789889

Output for EMPID 3 - Hide Mobile No. and Salary

EMPID,EMPNAME,Mobile No. SALARY

1,A,0,0

2,B,0,0

3,C,0,0

4,D,0,0

5,E,0,0

I hope I am now more clear.

Thanks & Regards,
Please Accepts as Solution if it solves your query.
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @neerajthakur 

I suspect the problem that you hit with OMIT is that for the users who had columns omitted the tables that included those columns broke instead of showing zero?

I think what you most likely will want is to combine two different approaches, as the problem with not using OMIT is that whilst you can suppress the values in tables that you create the values can still be found using Search and Selections.

What I would try is creating variables for both Salary and Mobile which return either the field name or a zero:

vSalary
=if(index(lower(OSUser()),'empid1','empid2') > 0, 'SALARY', 0)

vMobile
=if(index(lower(OSUser()),'empid1') > 0, '[Mobile No.]', 0)

You can then use these in expressions and dimensions rather than the field names themselves:

sum($(vSalary))

$(vMobile)

This will fix things from a UI perspective, but as I mentioned you should do an OMIT also, so the values can't be found via the back door.

Hopefully that will sort things for you.

Steve

 

neerajthakur
Creator III
Creator III
Author

Hi @stevedark 

I already tried this method while using omit function, the thing is I never wanted to make changes in UI as it will be required to be done with every object on every sheet and other apps too. I was trying to find some ways other than this, but I think I have to use this only.

Thanks for the help, time and commitment. 😊

Thanks & Regards,
Please Accepts as Solution if it solves your query.
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @neerajthakur 

If you do the heavy lifting in the variable and have that variable set in an include file then that would be the best way of rolling out to many places. It will be an effort first time out, but tweaks (e.g. changing users) will be easy.

Steve