IN() does not accept arguments of type List<Ref<User_Roles>>, List<Text>

I have security filters throughout many apps that are all of a sudden not working with IN() Statements. I am receiving the warning : IN() does not accept arguments of type List<ref>, List</ref

Users are unable to see their data now while the expression is in place and I'm having to remove them. Any ideas?

This is one of the expressions that I have that recently broke

OR(IN(INDEX(Current_User[Role], 1), LIST("Admin","Enviro")),
IN(SELECT(Users[Company_ID], [User Email] = USEREMAIL()),
LIST([Roustabout Contractor ID],[Roustabout Bid Award Contractor_ID],
[Recontour_Bid_Award_Contractor_ID], [Recontour Contractor ID])))

Solved Solved
0 1 43
1 ACCEPTED SOLUTION

Hello-

Try problem is with this expression, it is returning a list

SELECT(
      Users[Company_ID], 
      [User Email] = USEREMAIL()
)

Assuming your Current_User slice condition is [User Email] = USEREMAIL(), you can change it to

INDEX(Current_User[Company_ID], 1)

 The final expression will be: 

OR(
  IN(
    INDEX(Current_User[Role], 1), 
    LIST("Admin","Enviro")
  ),
  IN(
    INDEX(Current_User[Company_ID], 1),
    LIST(
      [Roustabout Contractor ID],
      [Roustabout Bid Award Contractor_ID],
      [Recontour_Bid_Award_Contractor_ID], 
      [Recontour Contractor ID]
    )
  )
)

 

View solution in original post

1 REPLY 1

Hello-

Try problem is with this expression, it is returning a list

SELECT(
      Users[Company_ID], 
      [User Email] = USEREMAIL()
)

Assuming your Current_User slice condition is [User Email] = USEREMAIL(), you can change it to

INDEX(Current_User[Company_ID], 1)

 The final expression will be: 

OR(
  IN(
    INDEX(Current_User[Role], 1), 
    LIST("Admin","Enviro")
  ),
  IN(
    INDEX(Current_User[Company_ID], 1),
    LIST(
      [Roustabout Contractor ID],
      [Roustabout Bid Award Contractor_ID],
      [Recontour_Bid_Award_Contractor_ID], 
      [Recontour Contractor ID]
    )
  )
)

 

Top Labels in this Space