Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Basically I have a variable that is a URL. Sometime it starts with http://. Other times it will start with https:// or www.
I basically want to create a Host Name variable from the URL variable.
So
http://hostone/moretextstuff/here
www.hostone/text/morestuff
The top three would be put classified as the same Host Name (Host One) based on the "hostone." The bottom one would be put in Host Name (Host 2) based on the part of it that says "hosttwo"
I am very much unsure how to go about this in Qlikview. Can anyone help me out here?
Let me try another way:
'Host ' & capitalize(textbetween(URL, 'host', '/'))
can you give example what should be stored in your new variables?
hostone\...
hosttwo\...
??
did you check the stringfunctions. they may help you
if you explain the outcome, it's easier to get help
try this substituting in your URL
subfield([Your URL], '/', 3)
Assuming the URL always contains either hostone or hosttwo:
if(index(URL,'hostone'), 'Host One', 'Host Two')
Basically what I want stored in my new variable would just be the host name. So the part that is after the www. but before any of the slashes.
So for the example I gave above I would want hostone and hosttwo to be what is stored in the new variable.
Yeah, I used hostone and hosttwo as a basic example, but with the data I'm working with I will likely have over 40 hosts.
Let me try another way:
'Host ' & capitalize(textbetween(URL, 'host', '/'))
Thank you, I'm a new user and was unaware of the textbetween() function! This worked perfectly for what I wanted, thank you!