Skip to main content
March 7, 2024
Question

Issue with userOrGroup type

  • March 7, 2024
  • 5 replies
  • 0 views

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
March 7, 2024

Hello [mention:846c51eb1d4a4ad192d7a4190f5e8f0b:e9ed411860ed4f2ba0265705b8793d05] 

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

harshitb6843
March 7, 2024

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
March 7, 2024

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

davidj137213
March 7, 2024

Try this

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

dhananjayk3480
March 10, 2024

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.