Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Cut FQDN to host and domain

Hi there again,

today I have a new Problem:

I have a list of FQDNs and paths, like:

//df020.sample.com/dfs/test$

test123.sample.com

new123.sample.com

//tf030.sample.com/new123

etc.

I need the hostnames standalone in a new field like test123, new123 but not the pathes.

Pathes can left blank in this new field.

I tried left, rigt, subfield, etc. but nothing really works.

Anybody an idea?

Thx in advance.

1 Solution

Accepted Solutions
MVP
MVP

Re: Cut FQDN to host and domain

Try like:

Load

          PurgeChar(SubField(YourField, '.',1), '/') as HostName,

          SubField(YourField, '.',2) as Domain

10 Replies
MVP
MVP

Re: Cut FQDN to host and domain

Try like:

Load

          PurgeChar(SubField(YourField, '.',1), '/') as HostName,

          SubField(YourField, '.',2) as Domain

Not applicable

Re: Cut FQDN to host and domain

Hi Tresesco,

thanx for your fast answer.

I tried your formula, but there I only get hostnames starting with numbers,

every other hostname starting with letter is empty?!

MVP
MVP

Re: Cut FQDN to host and domain

Could you give one such example (the entire field value) that failed?

Not applicable

Re: Cut FQDN to host and domain

Some failed ones:

aaaraehu000300p.sample.com

aawrtgj000500st.sample.com

nt546674dr.sample.com

mg45ffrt.sample.com

Good ones:

0dg556de.sample.com

586775436.sample.com

Every value starting with numbers is ok....

MVP
MVP

Re: Cut FQDN to host and domain

I guess it would be something else that is causing the problem. Otherwise, for these values too the expression should work like:

Capture.PNG

Not applicable

Re: Cut FQDN to host and domain

Hm, the problem must be anywhere else, you are right.

Is there a way to check in Qlik, if the values are all strings?

Or is there a chance to say: FQDN --> text?

MVP
MVP

Re: Cut FQDN to host and domain

IsText() - to check if text or not

Text() - to convert into text

Not applicable

Re: Cut FQDN to host and domain

They are all text....I don't understand this problem.

If I take the same data and cut it in Excel, everything is fine,

in Qlik only FQDNs with numbers at the start will work?

MVP
MVP

Re: Cut FQDN to host and domain

Could you share the sample qvw with sample data to look into the issue?

Community Browser