Dynamically enabling a form entry based on the content of another attribute (EDS_EPI_UI_ENABLE_ENTRY_BY_RULE)


While I've used the EDS_EPI_UI_RELOAD_EPI_BY_RULE option to control the generated value for an attribute based on another attribute for years, I guess I never got around to playing with EDS_EPI_UI_ENABLE_ENTRY_BY_RULE until now. My use-case is fairly simple: I have a virtual Boolean attribute that I want to enable only if the type of group being created is a Universal Security group.

What I'm stumped by is how to construct an expression that will return TRUE/FALSE, per the (very limited) SDK documentation. In PowerShell, the logical expression would look something like:

function onGetEffectivePolicy($request) {
  if ($request.Class -ne "group") { return }
  $groupType = $request.Get("groupType")
  if ((($groupType -bor 8) -eq $groupType) -and (($groupType -bor 0x80000000) -eq $groupType)) {
    # The entry should be enabled

Per the SDK, however, it seems that the only comparison that is available is to compare an attribute to TRUE. I even tried introducing a new edsvaGroupIsUniversalSecurity boolean with accompanying onPostGet code to populate it, but that didn't work.

If anyone has any thoughts, it would be most appreciated!