Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlik Scripting Issue

Hi, so I was wondering if anyone could provide an idea of how to implement the following in qlikview?

IF brackets in value string, then create a subfield of string within the brackets AS newValue

ELSE create a subfield of 1st 4 characters in value string AS newValue

Thanks, Ben

1 Solution

Accepted Solutions
sunny_talwar

May be like this:

If(Index(string, '(') and Index(string, ')'), TextBetween(String, '(', ')'), Left(String, 4)) as NewValue


Update: Missed a parenthesis

View solution in original post

2 Replies
sunny_talwar

May be like this:

If(Index(string, '(') and Index(string, ')'), TextBetween(String, '(', ')'), Left(String, 4)) as NewValue


Update: Missed a parenthesis

vishsaggi
Champion III
Champion III

Can you post some sample data and expected output if possible??