Joined: 12 May 2014
Location: United States
Online Status: Offline
Posts: 2
Topic: Help with creating Formula Field to extract parts Posted: 12 May 2014 at 8:21am
I am not sure anyone can help with this but any help would be SO appreciated!
I am unsure how to create a formula within the report I am writing to accomplish something in particular requested by management at my workplace for one of their own purposes,
and would love your help to get this working if you have knowledge of this concept and be most thankful
the field name I am working with is
{Inventory_Items.Host Name}
I have been asked to create a formula that will produce some of the Host Name String.
For example, we have some host names that have a dash in them , for example the host name is
Merlin-Test
Some of the host names do not have a dash
Merlin
I have a need to create one formula that will capture everything left of the dash (if there is a dash)
Then I need a formula to capture everything right of the dash (if there is a dash)
else just the host name
So in this idea, I don't know if I need some form of an "if then else" statement or three formulas?
So lets say in my above example with Merlin and Merlin-Test and a third hostname called IONA
I need to have a formula field that will show on the report the following visual:
Lets say we call the formula field for everything left of the dash "Top Level Host Name"
So this would produce the result of Merlin when it evaluates that we have Merlin-Test
A second column called "Second Level" would produce the word
Test
because test is right of the - in "merlin-test" host name
And then a third column hypotetically called Host no Dash
would produce the result of
Iona
Because Iona is listed in this field with no dashes in the host name
So if the hostname list in the database comprised of
Merlin
Merlin-Test
Iona
Then the result report would show
"Top Level Host Name"
Merlin
"Second Level"
Test
"Host no Dash"
Iona
Conceptually what I am trying to do is have a report that evaluates the host name field and if it find
the host name has a dash in it then I need one column that will show left of... a column that shows right of dash
and a third column that only captures host names with no dash
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum