Skip to main content
November 3, 2023
Solved

Get groups names with the input which we pass

  • November 3, 2023
  • 1 reply
  • 0 views

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.

    Best answer by sriramk5349

    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
    November 3, 2023

    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,
          {}
        )
      ))
    )