I have a use case to check if a group already exists. And if not, we should create the group.
Is there any way to check a group exists in an environment already.
Discussion posts and replies are publicly visible
By what metric would you judge whether a group "already exists"? If you're just going by Group Name, you can always check the "get group by name" function and see if there are any results.
I have a scenario to check a group exists by it's name without group ID..
I'm having a text value and want to check if a group name similar to a text exists or not.
i.e., Suppose, I have a country Code of IN for the country INDIA, Now, I want to check if any group in name of eg:"IN Users"(text value which is to be created as a group) is present in the environment.. If it is not present, I will go ahead and create a group named "IN Users".
Hi,
As Mike mentioned you can use a!groupsByName() to check if group with that name exist or not, like
if( a!isNullOrEmpty(a!groupsByName("IN Users")), "Create group", "Never mind, don't create" )