Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

dickelsa
Contributor

Remove first 2 characters from string and split string

Hi guys,

I have an issue:

For a client i need to create a report from our programm, which links some accountcodes to specific places. These links are shown as:

\\Financial\profit-and-loss-account\net sales\

To create a hierarchy, i need to split these strings in order to declare parent/chield fields.

First, i need to remove the '\\' at the beginning of each string,

next i need to split the data.

To split the data, i know i have to use SubString() function, that is not a problem

I just want to know if there is a code to remove the first '\\'.

Thanks!

Dick

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: Remove first 2 characters from string and split string

You could use the function replace(string, '\\', '') or mid(string, 3).

- Marcus

3 Replies
MVP & Luminary
MVP & Luminary

Re: Remove first 2 characters from string and split string

You could use the function replace(string, '\\', '') or mid(string, 3).

- Marcus

MVP
MVP

Re: Remove first 2 characters from string and split string

How about:

     Substring(textField, '\\', 2)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
dickelsa
Contributor

Re: Remove first 2 characters from string and split string

Substring should have been SubField()

Community Browser