Expand my Community achievements bar.

Calc Field HELP

Avatar

Level 1

We use calc fields to drive naming conventions on our projects. I have been successful on updating a few of the naming conventions however I need to apply a new formula that pulls in two fields in order to determine a portion of the name of the project. 

 

Example: 

  IF({DE:Collateral Routing Request Type}='ACAR',"ACAR"

 

I now need to look at the following two fields to determine a  portion of the naming convention:

  IF({DE:Collateral Routing Request Type}='Non-Campaign'

 

AND 

 

  IF({DE:What is the primary purpose or strategy of delivering this piece?}= Marketing then it should be NCM

 

I need to launch this ASAP so any help would be appreciated. 

 

Thank you! 

@Madalyn_Destafney 

3 Replies

Avatar

Community Advisor

Hi there, 

What is the end goal, you are looking to string these 3 pieces together in 1 calculated expression (CONCAT)? I'm not an expert in this but if so, that's where parentheses are key. For example, if you want them to all run together for the output, try something like:

CONCAT(IF({DE:Collateral Routing Request Type}='ACAR',"ACAR"),IF({DE:Collateral Routing Request Type}='Non-Campaign',"insert what you want it to read as if Non-Campaign is selected"),IF({DE:What is the primary purpose or strategy of delivering this piece?}='Marketing',"NCM"))

You put parenths around each piece of the expression, need to end up with same number of ( and ) parenths in the whole expression.

If this helped you, please mark correct to help others : )

Avatar

Level 1

I have a much larger calc field that this is part of. Essentially I need I need to combine two fields into one piece of a larger naming convention. CONCAT is at the top of my calc (seen below) so I need to be able to take these two fields and their answers to create NCM:

  1. DE:Collateral Routing Request Type}='Non-Campaign'
  2. DE:What is the primary purpose or strategy of delivering this piece?}='Marketing'

 

Calc Field:

CONCAT(
   IF({categoryID}='63333659003e535db976e18a3d2d87d4',"",{DE:Naming Convention Calc})
,
    IF({DE:Queue Topic ID - Fusion}='633738d300280e0e672038db9d372d56',
        "",
        IF({categoryID}='642208cc0009e3a2a5f1be882d94b075' ||
        {categoryID}='642b5b0500e9b28d56d79f08250f259f' ||
        {categoryID}='6447befa000566ad9098ab8896351b5b' ||
        {categoryID}='63333659003e535db976e18a3d2d87d4',
        IF(ISBLANK({DE:Merchant List}) || ISBLANK({DE:Events Request Type})|| ISBLANK({DE:Martech Request Type}),
        "","_"),"_"))

,
    IF({DE:Queue Topic ID - Fusion}='6337296e0020c005e41a374d55b4023a',"NCM",
    IF({DE:Queue Topic ID - Fusion}='633729fa002101adfac08affa0c4dd38',"NCS",
    IF({DE:Queue Topic ID - Fusion}='633729b10020e24b133642184d662116',"NBNC",
    IF({DE:Queue Topic ID - Fusion}='633738db002811970df553be7954955b',"SZL",
    IF({DE:Queue Topic ID - Fusion}='633738d300280e0e672038db9d372d56',"FSVCL",
    IF({DE:Queue Topic ID - Fusion}='633738e40028144488d9eb609622ab15',"BPD",
    IF({DE:Queue Topic ID - Fusion}='6425dd140029e8d51578e6e01cd7df6f',"VSTL",
    IF({DE:Campaign Type}='Statement Message',"Statement Message",
    IF({DE:Campaign Type}='Statement Ready Email',"Statement Ready Email",
        IF(ISBLANK({DE:Martech Request Type}),
        IF(ISBLANK({DE:Non Campaign Type Reporting}),
            IF(ISBLANK({DE:ACAR Asset Types}),
                IF(ISBLANK({DE:Events Request Type}),
                    {DE:Secondary Campaign Type},
                {DE:Events Request Type}),
            {DE:ACAR Asset Types}),
        {DE:Non Campaign Type Reporting}),
    {DE:Martech Request Type}))))))))))
,
    "_"
,
    YEAR({entryDate})
,
    "-"
,
    MONTH({entryDate})
,
    "-"
,
    DAYOFMONTH({entryDate})
,
    "_"
,
    {referenceNumber}
,
    "_"
,
    {DE:Naming Convention Suffix}
)

Avatar

Level 5

Not sure if I'm reading your question correctly, but are you saying that:

If the Request Type = Non-Campaign AND the Strategy = Marketing, then you want NCM?

If so, then I think either of these would work:

Option A:

IF({DE:Collateral Routing Request Type}='Non-Campaign' && {DE:What is the primary purpose or strategy of delivering this piece?}='Marketing',"NCM","")

Option B:

IF({DE:Collateral Routing Request Type}='Non-Campaign',IF({DE:What is the primary purpose or strategy of delivering this piece?}='Marketing',"NCM",""),"")