Skip to main content
January 11, 2023
Question

Buttons disable for particular groups or users

  • January 11, 2023
  • 2 replies
  • 0 views

Hi Everyone,

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

2 replies

amans0009
January 11, 2023

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"
  )
}

January 11, 2023

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