I am once again, asking for your assistance with a calculated custom field | Community
Skip to main content
MoniqueEvans
Community Advisor
Community Advisor
February 25, 2021
Question

I am once again, asking for your assistance with a calculated custom field

  • February 25, 2021
  • 3 replies
  • 490 views

I have a custom field called E-Comm Request Type with the field choices of NPI, Promo, GCX Campaign, SKU Refresh, and New Retail Setup. I'm trying to do a calc field that will combine these options into two categories Revitalized or New. I've quadruple-checked my calculation below and cannot figure out what I'm missing. PLEASE HELP!

IF(E-Comm Request Type="NPI"

,"Revitalized"

,IF(E-Comm Request Type="Promo"

,"Revitalized"

,IF(E-Comm Request Type="GCX Campaign"

,"Revitalized"

,IF(E-Comm Request Type="SKU Refresh"

,"New"

,IF(E-Comm Request Type="New Retail Setup"

,"New"

)

)

)

)

)

I also tried a version with unexpected value:

IF(E-Comm Request Type="NPI"

,"Revitalized"

,IF(E-Comm Request Type="Promo"

,"Revitalized"

,IF(E-Comm Request Type="GCX Campaign"

,"Revitalized"

,IF(E-Comm Request Type="SKU Refresh"

,"New"

,IF(E-Comm Request Type="New Retail Setup"

,"New"

,"UNEXPECTED VALUE: E-Comm Request Type = [" + E-Comm Request Type + "]"

)

)

)

)

)

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Doug_Den_Hoed_AtAppStore
Community Advisor
Community Advisor
February 25, 2021

I gave up using anything but letters in custom parameter names years ago, Monique: they can kill you.

In this case, I suspect the calculation engine is mistaking the dash in E-Comm for a minus sign.

Dropping the dash could break other existing formulas and reports, so (unless you are sure there are none) I suggest you wrap it and all your other custom parameters with {curly braces}, or even better, {DE:curly braces}.

And consider quitting. Using special characters, that is.

Regards,

Doug

P.S. this week, first time ever, I saw parameterValues with the prefix FROM: alongside those with DE: Does anyone know the origin story of those FROM: values?

imgrund
Adobe Employee
Adobe Employee
February 25, 2021

Hi Monique - for the first one, it looks like you are missing the FALSE value if something doesn't equal all that.

I would try...

IF(E-Comm Request Type="NPI","Revitalized",IF(E-Comm Request Type="Promo","Revitalized",IF(E-Comm Request Type="GCX Campaign","Revitalized",IF(E-Comm Request Type="SKU Refresh","New",IF(E-Comm Request Type="SKU Refresh","New","")))))

I just added a ,"" before your brackets.

MoniqueEvans
Community Advisor
Community Advisor
February 25, 2021

The facepalm I made as I read that. I didn't even think about the hyphen in E-Comm and now I'm kicking myself three times. Once for not thinking of it, and again for insisting we stay consistent and renaming EComm to E-Comm EVERYWHERE. Ugh, hindsight. And for anyone wondering... the third time is due to the fact that after doing all of the above it still wasn't working and I realized I missed one double quote mark

Thank you so so much Doug for rescuing me once again! This was killing me!!

I have not seen or heard anything about the FROM: but I'm intrigued