Skip to main content
New Participant
Jan 11, 2023 11:21 AM UTC
Question

Buttons disable for particular groups or users

Hi Everyone,

I have a requirement where i need to disable the button for particular user.

2 replies

amans0009
Participating Frequently
Jan 11, 2023 11:32 AM UTC

try this

{
  a!buttonArrayLayout(
    buttons: {
      a!buttonWidget(
        label: "Button",
        style: "NORMAL",
        /*for specific user*/
        disabled: if("restrictedUSer@appian.com"=loggedInUser(),true,false)
        /*for specific group*/
        disabled: if(a!isUserMemberOfGroup(loggedInUser(),"yourrestrictedGroup"),true,false)
      )
    },
    align: "START"
  )
}

Inspiring
Jan 11, 2023 11:45 AM UTC

You can use the showwhen functtionality with isuserMemberofGroup function to hide the components.