Skip to main content
April 9, 2025
Question

Is there any easy way to convert this low code to security expression?

  • April 9, 2025
  • 2 replies
  • 0 views

The following:

IMHO, the low code security row should be dynamically converted to a security expression whenever I switch to it and vice-versa.

It would save a lot of time.

By the way, is it really possible to apply such a security rule into a security expression? 

If so, how could I convert this into a security expression?

Thanks.

2 replies

April 10, 2025

Hi [mention:66e7f986653d4e6ba7ac15249a9a5776:e9ed411860ed4f2ba0265705b8793d05] 

Currently its not possible to covert security rule to security expression.

But you can write the same conditions in security expression using functions like {and,a!isusermemberofgroup,if}.

if(
  and(
    a!isUserMemberOfGroup(
      username: loggedInUser(),
      groups: { cons!HDS_APPROVERS },
    ),
    rv!record['recordType!HDS Request.isActive']=true(),
    rv!record['recordType!HDS Request.status']="Pending Approval"
  ),
  true(),
  false()
)

mikes0011
Brainy
April 10, 2025
IMHO, the low code security row should be dynamically converted to a security expression whenever I switch to it and vice-versa

That's asking a lot.  Just for one example, what happens when the expression contains something unable to be expressed in the low-code version?

how could I convert this into a security expression?

The only way is manually - it'll be cumbersome, but Vyshnavi already provided a good example of what the structure would look like.