Setting fields editable based on Role IDs

I’d like to make fields on the item card editable based on Roles I created. I think I understand how to make the field editable or non-editable using:

IF “Condition”=TRUE then BEGIN

CURRFORM.“Sell-to Customer No.”.EDITABLE(FALSE);

But how do I test if the current user has a specific role assigned? My “Condition” above needs to be 'Role ID is assigned to current User". TIA

have you looked at tables

2000000002 User
2000000003 Member Of
2000000004 User Role
2000000005 Permission

I’ve seen others add a field to the User table type boolean. Something Like “Item Card Editable”

and using code make the whole card editable or not. It appears you’re going to go field by field? Lot of work.

  1. Find My Serron in the Session Table - For future filtering Use User ID from Session Table

  2. If Login Type = Database look in Member Of Table

  3. If Login Type = Windows Look in User Role Table

I have looked at those tables but I don’t know how to write the condition statement:

“If current User ID is Member Of specific Role ID” - I’m not sure of the syntax to use

I can’t use a boolean field in the user table because I need to set the fields editable or non-editable for about 5-6 different groups of users. Since I’ve already created specific Roles for these different user groups, I thought it might make sense to use those as my conditions.

Thanks for the suggestions.