Skip to main content
Inspiring
Nov 3, 2023 7:34 AM UTC
Solved

Get groups names with the input which we pass

Hi Team,

I have requirement to get the groups names which has the input value which we pass.

For example: If I pass input value as "United States" I should get the group with the name "<App prefix>_United States",

India => "<App Prefix>_India"

Can anyone please help.

    sriramk5349
    Inspiring
    Nov 3, 2023 8:49 AM UTC

    Hi,

    You can use Group Picker Component - Appian 23.3 or getallgroups function and search for the name entered.

    a!localVariables(
      local!groups:getallgroups(batchsize:-1,startIndex:1),
      a!flatten(a!forEach(
        items: local!groups,
        expression: if(
          find(
            ri!text,group(fv!item,"groupName"),1
          )>1,
          fv!item,
          {}
        )
      ))
    )
    

    1 reply

    sriramk5349
    Inspiring
    Nov 3, 2023 8:49 AM UTC

    Hi,

    You can use Group Picker Component - Appian 23.3 or getallgroups function and search for the name entered.

    a!localVariables(
      local!groups:getallgroups(batchsize:-1,startIndex:1),
      a!flatten(a!forEach(
        items: local!groups,
        expression: if(
          find(
            ri!text,group(fv!item,"groupName"),1
          )>1,
          fv!item,
          {}
        )
      ))
    )