Skip to main content
eyleenm0004
April 20, 2023
Question

How can I get all groups for an specific app?

  • April 20, 2023
  • 4 replies
  • 0 views

I need to get the admin group in an specific app where the app name is going to be a rule input. Any suggestion? is there anyway to achive it?

4 replies

April 20, 2023

AFAIK, there is no direct function to get the admin group for a specific app.

Considering only application prefix is given, you can build a expression for this like below which would ofcourse depend on what naming convention you use for giving group names. 

a!localVariables(
  local!allGroups: getallgroupsnames(100, 1),
  reject(
    isnull(_),
    a!forEach(
      local!allGroups,
      if(
        like(
          fv!item,
          ri!applicationPrefix & "*" & "Admin*"
        ),
        fv!item,
        null
      )
    )
  )
)

But what is the need for it??

eyleenm0004
April 20, 2023

I'm trying to set alerts in a dinamicaly way when a process is an arch or utility process, process that other apps are going to user, so I want to notify to the admin group of the main app and not the arch app, any other suggestion?, maybe you solution can fix if I only look for admin groups, that is possible?

April 20, 2023

Bruhh, that can be done easily by creating a parameterized pv! of group type in utility process and use that pv! for sending alerts. Pass the application admin group constant to the input variable of utility process's sub-process node in main process.