# Calculation Help -- nested functions

Question asked by lindseym on Nov 3, 2016
Latest reply on Nov 3, 2016 by lindseym

I posted this earlier today, but after spending the better half of my day on it (I've learned a lot! but nothing pertaining to this portion of the original question)

The calculation I am looking for help with is:

If (Field Name) contains the word "Level" ; get everything (excluding the first space) after the word "Level" until you reach a "-" , if (Field Name) does not contain the word "Level" return TBD (highlighted)

The (Field Name) contains different values for example, but all instances are separated by a dash [the last item in the list (or the first if there is only 1  item in the list does not have a dash after], the order of the values could be in any random order:

Bldg North-Level 2-Section Beyond the Trees

Level 1-Bldg A4

Section Beyond The Trees

Outcome:

Field Name Contents: Bldg North-Level 2-Section Beyond the Trees

If (Field Name) contains the word "Level" ; get everything (excluding the first space) after the word "Level" until you reach a "-" , if (Field Name) does not contain the word "Level" return TBD (highlighted)        would return 2

If (Field Name) contains the word "Section" ; get everything (excluding the first space) after the word "Section" until you reach a "-" , if (Field Name) does not contain the word "Section" return TBD (highlighted)        would return Beyond The Trees

If (Field Name) contains the word "Bubble Gum" ; get everything (excluding the first space) after the word "Bubble Gum" until you reach a "-" , if (Field Name) does not contain the word "Bubble Gum" return TBD (highlighted)        would return

Thank you kindly,

-L