You need to sign in to do that
Don't have an account?
edoardo_spano
Error in formula field with multiselect picklist
Hi all,
I'm trying to write the below formula in a boolean formula field:
INCLUDES($User.Roles__c,Involved_Role__c)
Roles__c is a multiselect picklist. Involved_Role__c is a text field.
When I try to save the system throw this exception:
Error: Incorrect parameter type for function 'INCLUDES()'. Expected Text Literal, received Text
I tried to use the TEXT function on Involved_Role__c field, but it doesn't work.
How can I troubleshoot this issue?
Thanks in advance.
Edoardo
I'm trying to write the below formula in a boolean formula field:
INCLUDES($User.Roles__c,Involved_Role__c)
Roles__c is a multiselect picklist. Involved_Role__c is a text field.
When I try to save the system throw this exception:
Error: Incorrect parameter type for function 'INCLUDES()'. Expected Text Literal, received Text
I tried to use the TEXT function on Involved_Role__c field, but it doesn't work.
How can I troubleshoot this issue?
Thanks in advance.
Edoardo
Please let me know the requirement... What are you trying to achieve ?
Thanks..
INCLUDES(Involved_Role__c,$User.Roles__c)
INCLUDES allows second parameter must be text literal i.e. give some text value not text field.
ex:
INCLUDES($User.Roles__c,'some string')
Thanks,
naveen
I need to create a report which should show all records that have the involved role included in all selected roles of the logged user.
I thought to create a boolean formula field that is set to true when my requirement is verified, because I have no other ideas.
Can you help me with my trouble?
Thanks in advance
Edoardo
hi , just add Text() with picklist filed
INCLUDES(Text($User.Roles__c),Involved_Role__c)
try this.
Roles__c is a multi-select picklist, so I can't use TEXT function.
You can write a trigger on that Object.
1)Compare both the fields
2)If Involved_Role__c matches Roles__c update a boolean field to true.
3)Then you can genearate reports for the records which are true.
Sample code for this is
Thanks,
naveen.
Try with below formula ,
Replace A-D with your multipicklist value .
Let me know if it helps .
Roles__c (Multi Select Picklist field)
Values are below --
Junior Developer
Developer
Senior Developer
Lead
Manager
Senior Manager
Involved_Role__c (TEXT field)
Decision is a formula field with the criteria --
IF(Involved_Role__c=='Junior Developer' && INCLUDES(Roles__c ,"Junior Developer"),"Junior Developer",
IF(Involved_Role__c=='Developer' && INCLUDES(Roles__c ,"Developer"),"Developer",
IF(Involved_Role__c=='Senior Developer' && INCLUDES(Roles__c ,"Senior Developer"),"Senior Developer",
IF(Involved_Role__c=='Lead' && INCLUDES(Roles__c ,"Lead"),"Lead",
IF(Involved_Role__c=='Manager' && INCLUDES(Roles__c ,"Lead"),"Manager",
IF(Involved_Role__c=='Senior Manager' && INCLUDES(Roles__c ,"Senior Manager"),"Senior Manager",
Null))))))
Please key in only one value for the Involved_Role__c field...
Else, include that criteria also in the formula field, it will work ..
Thanks..