Skip to main content
Known Participant
Mar 7, 2024 11:06 AM UTC
Question

Issue with userOrGroup type

Hi everyone, just wondering why the string is not being typecasted to both user and group and being checked which one is valid since the type is userOrGroup?

5 replies

konduruc733182
Inspiring
Mar 7, 2024 11:27 AM UTC

Hello [mention:846c51eb1d4a4ad192d7a4190f5e8f0b:e9ed411860ed4f2ba0265705b8793d05] 

What is your requirement? you are expecting either a group id or an user name as an input?

harshitb6843
Brainy
Mar 7, 2024 1:24 PM UTC

The group has a number. You can extract that number using tointeger() function and then use it to cast it to the group. But like Kondru said, lets get clear with the requirement first. 

stefanhelzle0001
Brainy
Mar 7, 2024 12:43 PM UTC

Appian does not know what to do with your input string and casts it into a user.

davidj137213
Brainy
Mar 7, 2024 2:17 PM UTC

Try this

  if(isusernametaken("xxxxx"),
touser("xxxxxx"),
togroup(404))

dhananjayk3480
Inspiring
Mar 10, 2024 6:37 AM UTC

To test please pick user or group in rule input. don't type like string. As you can clerly see it says no group found.