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
I assume you will need to choose this option instead.
Thank you so much. How would be the ideal structure to make a filter expression to obtain my desired output?
As it says on that page, you need to use a!queryFilter (or a set of query filters joined together under a!queryLogicalExpression) - the simplest being configured along the lines of:
a!queryFilter( field: recordType!myrecordtype[record type field reference], operator: "=", value: tostring(loggedInUser()))
Thanks! I´m trying with this expression (I also searched in appian documentation). It works properly when I sign with an account of the group "CPF Proveedores", showing filtered values based on my username. But when I sign with another account out of the group, I obtain the null value and I can´t see the record. I think I should change the operator: "is null", for something that indicates that no filter should be used there but I want the values to be shown. What can I do?
Hi carlos,
Use an error message banner in the interface which will have the same showWhen condition as your security rule. Then, for the current record security rule, display all the values when the user is not in the group. The result of this would be: