Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
hansdevr
Creator III
Creator III

Can I use Section Access in Button->Show Conditional?

I have made a dashboard which monitors budgets in my organisation. I have successfully implemented Section Access, to shield off budgets for those who shouldn't see them and vice versa.

In the same dashboard, there is also a section, especially for directors and managers, which shows the KPI's. Now what I wanted to do, is put a button on the first sheet, which shows or hides through Section Access. To do this I added a second reduction field in SA, which I called 'SPECIAL', which only has one value, 'KPI'. For users who shouldn't see the button, I left the value blank. In my script, I added an Inline table called 'Kpi_access', in which there is 1 field (SPECIAL) and one value (KPI).

The button has a show condition Fieldindex('SPECIAL', 'KPI'). My thought was that users that hadn't the value KPI in their row in the excel file, should have 0 in this Fieldindex() function, thus hiding the button.

A nice thought, but alas, it did not work.

Thought anyone on how I should tackle this? Thanks in advance!! Please don't ask for the qvw, which is >500Mb...

1 Solution

Accepted Solutions
marcus_sommer

I have never done this myself but there are ways to control the visibility of sheets and objects with section access, see:

Sheets Security with Section Access

Sheets Security with Section Access File

Section Access - Hide Sheet Level

Chart Level Access by user

Sheet level access

A maybe simpler way could be just to use osuser() within the visibility of your sheets/objects, like:

if(match(osuser(), 'Director1', 'Manager1', ...)

- Marcus

View solution in original post

6 Replies
marcus_sommer

I have never done this myself but there are ways to control the visibility of sheets and objects with section access, see:

Sheets Security with Section Access

Sheets Security with Section Access File

Section Access - Hide Sheet Level

Chart Level Access by user

Sheet level access

A maybe simpler way could be just to use osuser() within the visibility of your sheets/objects, like:

if(match(osuser(), 'Director1', 'Manager1', ...)

- Marcus

enriquem
Creator
Creator

Hi,

You can try to do something like this:

SECTION Access;

LOAD * INLINE [

    USERID, PASSWORD, ACCESS

    ADMIN, ADMIN, ADMIN

    USER1, USER1, USER

    USER2, USER2, USER

    USER3, USER3, USER

];

Section Application;

ViewAccessMatrix:

LOAD * INLINE [

USERID, SeeObject

ADMIN,1

USER1,0

USER2,0

USER3,1

];

And finally in the object that you wanted to be displayed or not, you must put in the conditional of the object the next statement:

SeeObject=1

Regards

Kind Regards,
Enrique Mora.
hansdevr
Creator III
Creator III
Author

Not quite sure how this would work, but I'll definitely check it out as well! Thnx, Enrique!

hansdevr
Creator III
Creator III
Author

Somehow my earlier reaction got lost, but here goes:

Thanks Marcus!! I'll check those links out!! However, your last suggestion seems more simple and straightfoward, so I'll try that first! Thanks again!

enriquem
Creator
Creator

Thank you!!

Kind Regards,
Enrique Mora.
hansdevr
Creator III
Creator III
Author

It worked! Thanks. It's a simple but effective solution!