Dashboards & Visualizations

Dynamic Prompts for Users: Hide a prompt/input based on role

tdiestel
Path Finder

Hi All;

I have 2 types of users that will be coming to our dashboard. The first should be able to see all the different companies that belong to the organization. The next would be a user that could only see info for a single company in the organization. The ability to see the data depending on the users has been handled in our Role definitions, which is working great. But my problem/question arises with the prompt on the dashboard which allows the user to select what company they would like to view.

This prompt basically is just a list of all the companies the user has access to see, so to first user it is all the companies and for the second user it is just their 1 company. Thus the prompt really is only prominent for the first user and not the second, since the second only has 1 choice.

Is there a way to make the prompt only appear when the first user logs in and remain hidden when the second user logs in?

Thanks,
Tyler

1 Solution

jeffland
SplunkTrust
SplunkTrust

Basically you need two things: find the current user's role and make the display of that promt dependent on the result of that. The second part is really easy, there's a depends tag in XML you can use for that; see more here.

For the first, you can get that information as explained here for example.

View solution in original post

jeffland
SplunkTrust
SplunkTrust

Basically you need two things: find the current user's role and make the display of that promt dependent on the result of that. The second part is really easy, there's a depends tag in XML you can use for that; see more here.

For the first, you can get that information as explained here for example.

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...