Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Disable button based on button text

Hi, 

 

I'm trying to disable a button when Button Text displays "View Restricted".

 

Right now, my button text is formulated so it displays either "view restricted" or "click to view report" based on their userprincipalname. So for example, if user A is eligible to view, when user A sees the welcome page, he will see "Click to View Report"; if user B's not eligible, then user B sees "View Restricted." 

 

I want the button to navigate me to another tab (named Home) when it says "Click to View Report" but when it says "View Restricted" I want the button to be disabled. 

 

Is this possible? 

5 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      I am trying to avoid drillthrough function because there is nothing to be selected to trigger the drillthrough. The report is pulling who is viewing the report by userprincipalname function, which then changes the button text to either restricted or click to view data. 

      Is there not a way to reach a solution by keeping navigation button (and making the button have multiple functions depending on button text) instead of changing it to drillthorugh? 

  • Anonymous's avatar
    Anonymous
    Not applicable

    I know this is rather late, but you can do the disabling without needing to do the drill-down functionality.


    1. Create a measure with a conditional check -

     Destination_Page = IF(ISFILTERED('Table'[Location]),"Page 2")
    2. On a standard button, choose Page Navigation as the type
    3. In the Destination field, use the measure.
     
    You can do the same thing on the button text, obviously with a different measure.
     

    In the action feature of a standard button, choose Page Navigation.