Forum Discussion

User232431's avatar
User232431
Helper III
1 year ago
Solved

Disable Button Action based on user login

I Have 3 (first row in pic)cards and buttons on top of each card , and these buttons has assigned each bookmark.

if user "[email protected]" login i can able to make card and button invisible to him and it becomes (second row in pic).

but after that the button is isin still active mode which he can click on invisible card and it leads to show the bookmark which is assigned to it.

How can we make button action turned "off" even if he clicks on invisible button for that specific user.

Thanks in advance

 

  • Hi User232431 ,

    Create Two Versions of the Button:
    Button A: This is the real button, linked to a bookmark. It should be visible only to authorized users.
    Button B: This is a dummy (transparent) button with no action assigned. It should be shown only to restricted users.

    To manage visibility:
    Open the Selection Pane, and control which button is visible.
    In the Bookmarks Pane, create two bookmarks:
    One showing Button A and hiding Button B.
    One showing Button B and hiding Button A.
    When creating or updating each bookmark, make sure to:
    Uncheck the option for Data.
    Check the options for Display and Current Page.

    If this post helps, please give us Kudos and consider marking it Accept as solution to assist other members in finding it more easily.

    Regards,
    Chaithra

6 Replies

  • Use conditional formatting on the Action → Bookmark field:

    1. Select the button.
    2. Go to Action → Type: Bookmark.
    3. Click the fx next to Bookmark.
    4. Use a DAX measure like:

    BookmarkSelector =

    IF(USERPRINCIPALNAME() = "[email protected]", BLANK(), "YourBookmarkName")

    Assign this measure in the fx field.

    • User232431's avatar
      User232431
      Helper III

      Hi Thanks for reply , i found that there is no "fx" is available for bookmark selection

       

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi User232431 ,

    Create Two Versions of the Button:
    Button A: This is the real button, linked to a bookmark. It should be visible only to authorized users.
    Button B: This is a dummy (transparent) button with no action assigned. It should be shown only to restricted users.

    To manage visibility:
    Open the Selection Pane, and control which button is visible.
    In the Bookmarks Pane, create two bookmarks:
    One showing Button A and hiding Button B.
    One showing Button B and hiding Button A.
    When creating or updating each bookmark, make sure to:
    Uncheck the option for Data.
    Check the options for Display and Current Page.

    If this post helps, please give us Kudos and consider marking it Accept as solution to assist other members in finding it more easily.

    Regards,
    Chaithra

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi User232431 ,

    We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
    If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

     

    Regards,
    Chaithra.

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi User232431 ,

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
    If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

     

    Regards,
    Chaithra.

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi @User232431 ,

    We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
    If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

     

    Regards,
    Chaithra.