Record-Security Rules/Expressions

Hi! I was trying to make a security rule for my record (filter --> loggedUserName() = nomProveedor (one of my fields)), but in the security rule I can only put direct values or constants

 

I found out that there are security expressions, but how should be my structure to obtain a filter like the mentioned one? Example:

Username: Proveedor 1

I want to filter the record so that he can only see the rows in which my field "nomProveedor" is equal to the Username

Thanks a lot!

  Discussion posts and replies are publicly visible

Parents Reply
  • Several issues here.

    The logic in your and() statement, namely the second line, is nonsensical to Appian.  The not() rule returns the opposite value of a boolean value exclusively - but "nomProveedor" is NOT a boolean value.  Additionally the value you have inside the "not()" is a reference to a record field, not a reference to a value, which i presume you want.  So to fix this, you'll need to change this line completely so that it actually returns a meaningful value to the parent logic.

    Additionally I don't believe you can apply logic here that invokes the value in a field of a specific row of the record (like you seem to want to be doing on line 4).

    If we take out line 4 altogether, for example, then the current filtering logic translated into plain language would basically be,

    "If the viewer is a member of CPF Proveedores, then only allow them to see record entries where nomProveedor is NULL.  Otherwise, only allow them to see record entries where nomProveedor equals their username."

    What else still needs to be different?

Children