I'm using a formula thats checks the name of a role and sets true or false a box. The problem is that i'm calling a firld that is already a formula, so i'm getting the compiling error.

Instead of using this formula:

OR(Nombre_Rol__c='Secretario dirección',
Nombre_Rol__c='Secretario financiero',
Nombre_Rol__c='Secretario merchandising',
Nombre_Rol__c='Secretario legal',
Nombre_Rol__c='Secretario RRHH',
Nombre_Rol__c='Jefe de IT',
Nombre_Rol__c='Secretario técnico',
Nombre_Rol__c='Jefe de seguridad',
Nombre_Rol__c='Jefe de mantenimiento',
Nombre_Rol__c='Mecánico jefe',
Nombre_Rol__c='Jefe de almacén',
Nombre_Rol__c='Jefe de eventos',
Nombre_Rol__c='Jefe de tienda',
Nombre_Rol__c='Director del hotel',
Nombre_Rol__c='Camarero de piso',
Nombre_Rol__c='Recepcionista hotel',
Nombre_Rol__c='Jefe de cocina')

I wanna make something like this, but i don't know if it's possible and the right syntax:

IF(Nombre_Rol__c in ('Secretario dirección',
'Secretario financiero',
'Secretario merchandising',
'Secretario legal',
'Secretario RRHH',
'Jefe de IT',
'Secretario técnico',
'Jefe de seguridad',
'Jefe de mantenimiento',
'Mecánico jefe',
'Jefe de almacén',
'Jefe de eventos',
'Jefe de tienda',
'Director del hotel',
'Camarero de piso',
'Recepcionista hotel',
'Jefe de cocina'

Any help would be really apreciated.

1 Answer 1


You might be able to use a CASE formula to save a few characters by not constantly repeating the Nombre_Rol__c field name.

'Secretario dirección',1,
'Secretario financiero,1,
'Secretario legal',1,
'Secretario RRHH',1,
'Jefe de IT',1,
'Secretario técnico',1,
'Jefe de seguridad',1,
'Jefe de mantenimiento',1,
'Mecánico jefe',1,
'Jefe de almacén',1,
'Jefe de eventos',1,
'Jefe de tienda',1,
'Director del hotel',1,
'Camarero de piso',1,
'Recepcionista hotel',1,
'Jefe de cocina'1,
0) > 0

I make the OR version to be 655 characters. The CASE version is 430.

Note that I'm returning a 1 or 0 from the CASE statement to save characters and then doing a Logical > 0 to return true or false.

There shouldn't be a need for a IF(X, TRUE, FALSE) formula. It's redundant to return true if X is true and false if X is false. Just return X.

The alternative option is to create an additional field and have a workflow/trigger/process etc.. set the field value when the Nombre_Rol__c field is changed. Then you don't need to pay for cost of recalculating it in the dependent formulas.

  • 1
    Hi Daniel, i really appreciate your answer. It's an excellent solution, but it didn't worked because Nombre_Rol__c it's a formula field, so i had the same error. Anyway it helped me applying your solution (with a small change) to the picklist field and removing the formula field Nombre_Rol__c. Thanks so much! Commented May 28, 2019 at 7:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .