Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Start with a field selection according to section access

Dear community, I have a problem that I hope you can help me with.

I have the following section access

Section Access;

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, DEPARTMENT

    ADMIN, ADMIN, ADMIN123

    USER, USER, USER123, SALES

];

Section Application;

What I want to do, is that USER which can only access to the SALES Department, starts with this DEPARTMENT Selected.

Thank you very much

15 Replies
tresesco
MVP
MVP

When only one department is there in the scope, if selected or not - result would be same (assuming the conditional expression like - if(getselectedcount(... is not being there). Otherwise, you could try with OnOpen trigger ->Select in Field

marcus_sommer

This won't be necessary then in this case no other data will be available.

- Marcus

gsbeaton
Luminary Alumni
Luminary Alumni

You could do this with the OnPostReduceData() trigger found under Settings>>Triggers.

Add the SelectInField() action.  Field will Be Department and Search string will be =concat(Department,'|').

I haven't tested that but in theory it should work, even if the signed in user has multiple distinct departments.

George

awhitfield
Partner - Champion
Partner - Champion

Hi Francisco,

have you set:

See attached example

Andy

Anonymous
Not applicable
Author

I forgot to explain that I have lots of different DEPARTMENTS and more than one user

gsbeaton
Luminary Alumni
Luminary Alumni

True, but I can see reasons why a designer may want a particular field to be selected, even if the data in scope remains the same, eg:

  1. Usability, sometimes users need that comfort of seeing a particular field green
  2. Functional: Maybe previous design has implemented a different chart to be displayed depending on what Department a super user selected.  Selecting a department automatically upon datareduction completing would mean that no changes were required to legacy functionality.

George

gsbeaton
Luminary Alumni
Luminary Alumni

Can a single user have access to more than one department?

tresesco
MVP
MVP

That's okay. You meant like:

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, DEPARTMENT

    ADMIN, ADMIN, ADMIN123

    USER1, USER1, USER123, SALES

     USER2, USER2, USER123, IT

....

];

If so, USER1 will see only SALES whereas USER2 will see only IT. So, one department for each user would be visible. Perhaps, then you wouldn't have to select that single available department, right?

And if users could have multiple departments like:

LOAD * INLINE [

    ACCESS, USERID, PASSWORD, DEPARTMENT

    ADMIN, ADMIN, ADMIN123

    USER1, USER1, USER123, SALES

     USER1, USER1, USER123, IT

....

];

Try with OnOpen trigger as I suggested above.

Anonymous
Not applicable
Author

The thing is that I have lots of charts that as a dimension it considers all of the Departments, so, If I don't start with a selection, no matter which user is connecting, it will show the information of all the Departments even though I just want to show him just one.