Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

string funtions

hi QV,

Can any have complete explanation on string Functions with examples .plzzz help me out with this

-lohi

11 Replies
Employee
Employee

Re: string funtions

from the qlikview help select 'index' tab and type:  string functions and you'll get the list.

you need to install qlikview Personal edition first.

since its all public , here is a PDF extract from the help of the same

Not applicable

Re: string funtions

Well if you could tell me what you want to do I could sourly help you!

Not applicable

Re: string funtions

great attachment , thxs is any string functions out of this in Qlik View

deepaktibhe
Valued Contributor

Re: string funtions

len(string) Returns the length of

a string.

len('QlikView') 8

left(string,

number of

characters)

Starting from the left

of the string, returns

the specified amount

of characters.

left('QlikView', 4) Qlik

right(string,

number of

characters)

Starting from the

right of the string,

returns the specified

amount of characters.

right('QlikView', 4) View

mid(string,

starting

character,

number of

characters

(optional))

Returns a substring

from the string,

starting at the

specified character.

Optionally, the

length of the

substring can be

specified. If no length

is specified, the

right-most part of the

string (starting at the

specified position) is

returned.

mid('QlikView', 5,

2)

mid('QlikView', 5)

Vi

View

index(string,

substring,

occurrence

(optional))

Returns the

position at which

the substring is

found in the string.

If an occurrence is

specified, QlikView

will look for that

specific occurrence,

otherwise the

first occurrence

is assumed. If a

negative number

is supplied for

occurrence, QlikView

starts searching from

the end of the string.

If no match is found,

the function returns

0.

index('QlikView',

'i')

index('QlikView',

'i', 2)

index('QlikView',

'i', -1)

3

6

6

upper(string) Converts the string

to upper case.

upper('QlikView') QLIKVIEW

lower(string) Converts the string

to lower case.

lower('QlikView') qlikview

capitalize

(string)

Capitalizes each

word in the string.

capitalize

('QlikView

document')

Qlikview

Document

replace(string,

search string,

replace string)

Replaces the search

string in the string

with the replace

string.

replace('QlikView',

'Qlik', 'Click')

ClickView

mid(string,

starting

character,

number of

characters

(optional))

Returns a substring

from the string,

starting at the

specified character.

Optionally, the

length of the

substring can be

specified. If no length

is specified, the

right-most part of the

string (starting at the

specified position) is

returned.

mid('QlikView', 5,

2)

mid('QlikView', 5)

Vi

View

index(string,

substring,

occurrence

(optional))

Returns the

position at which

the substring is

found in the string.

If an occurrence is

specified, QlikView

will look for that

specific occurrence,

otherwise the

first occurrence

is assumed. If a

negative number

is supplied for

occurrence, QlikView

starts searching from

the end of the string.

If no match is found,

the function returns

0.

index('QlikView',

'i')

index('QlikView',

'i', 2)

index('QlikView',

'i', -1)

3

6

6

upper(string) Converts the string

to upper case.

upper('QlikView') QLIKVIEW

lower(string) Converts the string

to lower case.

lower('QlikView') qlikview

capitalize

(string)

Capitalizes each

word in the string.

capitalize

('QlikView

document')

Qlikview

Document

replace(string,

search string,

replace string)

Replaces the search

string in the string

with the replace

string.

replace('QlikView',

'Qlik', 'Click')

ClickView

Employee
Employee

Re: string funtions

yes these are the string functions that qlikview supports.

Not applicable

Re: string funtions

ya sure my requirement is ,

1. we have a variable and field with string .

2.it should check the whole field what we have enter in "Input Box"

3.if that is not there it should show Null if it there it should Compare with Sales or some other fields which we mention in for loop

plz sort me out of this problem

-lohi

Employee
Employee

Re: string funtions

substringcount is 1 way.  Just replace your field below where i have fieldname and replace vVariableName with your variable name and 'compare with sales' with the rest of your expression.

if (  substringcount(  [FieldName] , $(vVariableName) )  > 0 ,  ..compare with sales...,  null())

Not applicable

Re: string funtions

1. we have a variable and field with string .

2.it should check the whole field what we have enter in "Input Box"

3.if that is not there it should show Null if it there it should Compare with "Sales" or some other fields which we mention in" for loop"

plz sort me out of this problem

-lohi

Community Browser