Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Calculated Field with IF Expression

Avatar

Level 9

Hi WF Community,

I'm trying to create a calculated field on the Task object with a simple IF expression, yet it keeps telling me the "Custom Expression is Invalid".

Here's my expression:

IF(INV - Item Number="I-132 Retainer",400001 Retainer,"")

*INV - Item Number is another field (dropdown) on the same custom form

Does anyone know where I'm going wrong?

Thanks,

Nick

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 10

HI Nick,

It's likely the problem you are experiencing is due to field you are referencing in the expression having a '-' character in it. Workfront generally doesn't like non alphabetical or numerical characters the custom field names as it reads them as part of your expression, in this instance it is reading a minus symbol.

Try updating the field name to remove the '-' symbol and see if that works.

Best Regards,

Rich.

View solution in original post

6 Replies

Avatar

Correct answer by
Level 10

HI Nick,

It's likely the problem you are experiencing is due to field you are referencing in the expression having a '-' character in it. Workfront generally doesn't like non alphabetical or numerical characters the custom field names as it reads them as part of your expression, in this instance it is reading a minus symbol.

Try updating the field name to remove the '-' symbol and see if that works.

Best Regards,

Rich.

Avatar

Level 9

Thanks, Richard. This was the issue! Gott'er working now after that modification.

Avatar

Level 9

Hi again, Richard.

I went to add additional IF's to that original expression, but I'm getting that "Custom Expression is Invalid" error again.

Here's my original, singular IF that works:

IF(INV Item Number="I-132 Retainer","400001 Retainer","")

Here's my new, multiple IF that isn't working:

IF(INV Item Number="I-132 Retainer","400001 Retainer",IF(INV Item Number="I-133 Project - Fixed Cost","400002 Project - Fixed Cost”,""))

Any idea why the multiple IF isn't working? Followed this to a tee

Avatar

Level 9

I figured it out....it had to do with more "&" and "-" symbols. Had to reconstruct and save, reconstruct and save and make sure it was as clean as possible (no symbols, even in the "then this" results).

Cheers.

Avatar

Level 10

Hi Nick,

In addition to Richard’s suggestion (with which I heartily concur, as a best practice), you could also have resolved the problem by enclosing each such custom parameter with brace and the Data Extension prefix (eg {DE:My - Parameter}), as doing so clarifies to the calculation engine to treat the term within the brackets as a single, valid, existing custom parameter.

Regards,

Doug

Avatar

Level 9

Very interesting, Douglas. That's good to know...I can use that too.