You need to sign in to do that
Don't have an account?
Javier CG
Convert text to id in formula editor
I am creating a quick action to create record (Event) and I need to assign default values on some fields.
One of the fields is the Assign to. Usually the event is assigned to the current user, but in some cases I need to assign the event to one concrete user.
I try to do it through this formula:
IF( $Profile.Name != "Profile 1" && $Profile.Name != "Profile 2", "XXXXXXXXXXXXXXX", $User.Id )
Where "XXXXXXXXXXXXXXX" is the id of the concrete user. But this formula raise error:
Error: Formula result is data type (Text), incompatible with the expected data type (Search(Calendar,User)).
There is any form to cast the text string of the id into id or some other form to achieve that I need to do?
One of the fields is the Assign to. Usually the event is assigned to the current user, but in some cases I need to assign the event to one concrete user.
I try to do it through this formula:
IF( $Profile.Name != "Profile 1" && $Profile.Name != "Profile 2", "XXXXXXXXXXXXXXX", $User.Id )
Where "XXXXXXXXXXXXXXX" is the id of the concrete user. But this formula raise error:
Error: Formula result is data type (Text), incompatible with the expected data type (Search(Calendar,User)).
There is any form to cast the text string of the id into id or some other form to achieve that I need to do?
All Answers
And I don´t need to cast the $User.Id, that´s an Id and runs well.
The problem is in the if part of the IF function, when I return 'XXXXXXXXXXXXXXX' as a text and like the 'Assigned to' field has Id data type, I get the error. I need to cast or convert the text id to Id to return it in the if section of the IF function, but I can´t find a function or other way to do it.
Regard: vbtcafe (http://www.vbtcafe.com/)