Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Trim

hi i have a apps that read data from server logfile . it capture all the apps name as ####.qvw , is there any way when its load then trim qvw.

i only want document  name ,  for example     Finance.qvw   as finance

This is my load script

Lower(Mid(Document,Index(Document,'\',-1)+1)) as QVWName,

Tags (1)
1 Solution

Accepted Solutions
Highlighted

Re: Trim

Hi,

I see that you made use of my solution but I am not sure why you deleted my comment. I just want to let you know that I don't post only for you but for the benefits of others who will come across such scenario.

I am posting it again for others sake.

Replace(Lower(Subfield(Document,'\',-1)),'.qvw','') as QVWName,


Or


Replace(Lower(Mid(Document,Index(Document,'\',-1)+1)), '.qvw','') as QVWName,

View solution in original post

11 Replies
Highlighted
Champion III
Champion III

Re: Trim

Can you use subfield?

Do you have a list how it is coming?I mean is there a path?

Like

Subfield('document', '.qvw',1)

Highlighted
Not applicable

Re: Trim

Hi Ujjwal,

https://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/Scripting/StringFunctions/Trim.h...

Trim - script and chart function

Trim() returns the input string trimmed of any leading and trailing spaces.

Syntax:

Trim(text)

Return data type: string

Highlighted
Not applicable

Re: Trim

You can use the Replace() function in your load script.

Just simple put in Replace(.qvw column name, '.qwv', '')
With this you replace the .qvw part with nothing by putting two apostrophe's.

Hope I have helped you with this

Highlighted
Creator III
Creator III

Re: Trim

HI,

You can use subfield() as following...

subfield(FieldName,'.',1) as NewFieldName.

through above you will get left side value of dot ".".

Thanks,

Highlighted
Creator III
Creator III

Re: Trim

Thanks Pooja ,

i tried this and it works .

Replace(Lower(Subfield(Document,'\',-1)),'.qvw','') as QVWName,

Highlighted

Re: Trim

Hi,

I see that you made use of my solution but I am not sure why you deleted my comment. I just want to let you know that I don't post only for you but for the benefits of others who will come across such scenario.

I am posting it again for others sake.

Replace(Lower(Subfield(Document,'\',-1)),'.qvw','') as QVWName,


Or


Replace(Lower(Mid(Document,Index(Document,'\',-1)+1)), '.qvw','') as QVWName,

View solution in original post

Highlighted
MVP
MVP

Re: Trim

Another one, using subfield onl

SubField(Lower(SubField(Document, '\', -1)), '.qvw', 1)

Highlighted
Master III
Master III

Re: Trim

Try

Left(DocumentName(),Index(DocumentName(),'.')-1)

Highlighted
Creator III
Creator III

Re: Trim

Thanks tamilarasu‌  thanks for help. and also does that will only trim the document which has .QVW at the end. coz some document name does not have QVW at the end thanks.

somehow by accident it got deleted.

Thanks Again