Hello,I am using the function a! groupsByName ("nameGroup") to get the id from the name of a group but the result returns us[Group: 123] and I have to do the treatment to get the 123.
toInteger( substitute( split( "[Group: 123]", ":" ), "]", "" ) )
Do you know if there is any more direct way to get it?
If you call tointeger() on a string, it will automatically strip out everything from the string that isn't a number and return the resulting integer. And in this case, I think the type returned is actually "group type", which you can just call toInteger on itself - either way, you should probably be able to do what you were originally trying to do with a lot less fuss.
Just keep in mind that if there's ever any possibility that 2 groups have the same name, a!groupsByName() will return an array.
Good option thank you very much
Discussion posts and replies are publicly visible
© 2020 Appian. All rights reserved.