Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
SonOfJeffGoldblum
New Contributor III

Index Function

JSON value has several parts that I need to grab just one, AnswerText (AT).

AnswerPart:,AnswerColumn:,AnswerText:,AnswerExportValue:,AnswerComment:,AnswerOther

AT contains a value that I have grabbed easily for another function, but for this in particular, I have done a subfield, replace, mid, and index but am not finding the right part I need. 

replace(mid(AT,index(AT,':',3)+1,index(AT,',',3)-index(AT,':',3)-1),'"','')

AT can have three values: "Online", "In Person", and "Friend, Family, someone else"

With the above function, I am only grabbing the first value before the comma which removes the ", Family, someone else" of that AT value.

Can anyone help with being able to grab that whole part: "Friend, Family, someone else"?

Help me Obi-Wan Kenobi, you're my only hope

Everything not saved will be lost
— Nintendo Quit screen message
1 Reply
Highlighted

Re: Index Function

How about

If(Index(AT, 'AnswerText (AT)'), AT) as AT

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)