Announcement

Collapse
No announcement yet.

Formula script is not working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Formula script is not working

    I am trying to use the below formula in a workflow:
    X=ifThenElse(Y==['A'], 1, 0); where A is one of the options from a multi-enum field 'B'
    X= Foreign field that is linked to B (A multi-enum field)
    I am not sure what is wrong with this formula. I tried modifying it by using Y==[''A'']/'['A']'/A but nothing works.

  • #2
    Hi mansi.kakkar,

    You cannot change a field with Foreign type, either with a formula or manually. Its value is always automatically pulled from the field of the linked record. You can find out more about this type of field here: https://docs.espocrm.com/administration/fields/#foreign.

    Also, keep in mind that the Multi-Enum field is an array-type field (a list of values), so to check if it has any value, you need to use array\includes() function: https://docs.espocrm.com/administrat...#arrayincludes.
    More about Multi-Enum field you can find here: https://docs.espocrm.com/administrat...ds/#multi-enum.

    Comment

    Working...
    X