03-17-2017 03:40 PM
I am trying to create a calculated item to use in my COMMUNICATION_NODE
calculated item => CONTACT_NO
I'm just not quite sure how to setup the formula in the CALCULATED_ITEM expression section.
03-17-2017 05:17 PM
If Home, Work and Celluar number are all columns in the same table which is part of your datamart (like a customer table), then a calculated item is very straightforward.
A more generic and flexible approach is a "case" statement. You can resolve many different challenges with this thing. In this case, it will be
case when <</Home_No>> is not missing then <</Home_No>> when <</Work_No>> is not missing then <</Work_No>> else <</Cellular_No>> end
Clearly you will have to replace the <</Home_No>> tags with your actual data item identifiers, as you insert them to the formula editor.
In this particular case, you can also try to use a coalescec function:
coalescec (<</Home_No>>, <</Work_No>>, <</Cellular_No>>)
If however your data are in a vertical table with one phone number per line, and a phone type indicator in another column (as it sometimes happens), choosing one phone number from such table would also be possible, but a little bit more trickier. This I think goes beyond the scope of your question.