Edit field if user is member of a gruop

I have person form in NAB and it has "Employee ID " field. I want that the users of some specific groups should be able to edit that field else it should be only readable field.

suppose group names are ITSD_AM, ITSD_EMEA, ITSD_APAC, ITSD_FIN, ITSD_SWE .

Please can anyone help here? I want to put the formula in Input Enabled event of the field which is a Ediatble text field.

Thanks in advance!!!

Subject: Edit field if user is member of a gruop

One way would be to

1). Put your Groups in a role in the ACL

2). Create a computed field underneath your editable field with a hide-when formula to hide it if the user is a member of the role

3). Add a hide-when formula to the editable field to hide it if the user is not a member of the role.

As it is the NAB you will need to be careful to replace the code if you ugrade and the design is refreshed.

Subject: RE: Edit field if user is member of a gruop

hello,

Thanks a lot for your response.

I didn’t get how could this solve my problem. I created 1 role named [EmployeIDEditor] and a group #EmployeID_Edit and give that role to the group and then put a below formula in the “Input Enable” event of the form,

Roles := @Implode(@UserRoles);

@If((@Contains(Roles;“[EmployeIDEditor]”) | @Contains(Roles;“[GroupCreator]”) | @Contains(Roles;“[UserCreator]”));1;0)

Please can you tell me should this work? Or just explain me the above solution in little brief.

Thanks a lot!!!

Subject: RE: Edit field if user is member of a gruop

This formula is much simpler:

@UserRoles *= “[EmployeIDEditor]” : “[GroupCreator]” : “[UserCreator]”

For Input Enabled formulas, like hide-when formulas, there is rarely a good reason to use @If. The formula is being used like the CONDITION clause of an @If; it will evaluate to @True if the condition being tested is true, @False otherwise.