Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
everest226
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,

1 Solution

Accepted Solutions
tamilarasu
Champion
Champion

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
vishsaggi
Champion III
Champion III

Can you use subfield?

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

Like

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

Not applicable

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

Not applicable

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

Anonymous
Not applicable

HI,

You can use subfield() as following...

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

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

Thanks,

everest226
Creator III
Creator III
Author

Thanks Pooja ,

i tried this and it works .

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

tamilarasu
Champion
Champion

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,

maxgro
MVP
MVP

Another one, using subfield onl

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

sasiparupudi1
Master III
Master III

Try

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

everest226
Creator III
Creator III
Author

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