Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
syahfira
Partner - Contributor III
Partner - Contributor III

Find characters in string

Hi Qlik Community

I need help so much on this. I tried so many ways but still I couldn't manage to fix it as am a real beginner in Qlik Sense.

This is my code that I create in script load editor in Qlik Sense.

    IF("Clrng doc." > 0, 'PAID & CLOSED',

      IF("Clrng doc." < 0 AND "Doc. No." > 0, 'POSTED - TO BE PAY',

        IF("Step description" = 'GR', 'GR ISSUE',

          IF("Step description" = 'COST CONTROLER', 'PENDING COST CONTROLLER VERIFICATION',

            IF("Step description" = 'APPROVAL', 'PENDING APPROVAL',

              IF("Step description" = 'BU REVIEWER', 'PENDING BU REVIEWER',

                IF("Step description" = 'TAX REVIEW STEP 1', 'PENDING TAX REVIEW',

                  IF("FI / MM" = 'MM' AND "Purch.Doc." < 0, 'MISSING PO',

                    IF("Clrng doc." < 0 AND "Doc. No." < 0 AND "Purch.Doc." < 0, 'NOT STARTED',

                      IF("Clrng doc." < 0 AND "Doc. No." < 0 , 'UNKNOWN')

                      ))))))))) as [Invoices Status]

Screenshot_5.jpg

My issue is on the "Step Description".

If the "Step Description" contain any word that called 'GR', the [Invoices Status] will have 'GR ISSUE'.

That's how I need to fulfill for the rest of "Step Description" condition.

The output that I got for this script is only for,

Screenshot_4.jpg

I do not know how to find the characters that I want in a string in Qlik Sense scripting.

Thanks so much for helping me out. I appreciate it so much.

1 Solution

Accepted Solutions
Ivan_Bozov
Luminary
Luminary

If I understand correctly you are looking for fields containing GR. Try like

....

IF(WILDMATCH([Step Description], '*GR*'), 'GR ISSUE',

...

More about MATCH and WILDMATCH here:

https://help.qlik.com/en-US/sense/September2018/Subsystems/Hub/Content/Sense_Hub/Scripting/Condition...

https://help.qlik.com/en-US/sense/September2018/Subsystems/Hub/Content/Sense_Hub/Scripting/Condition...

vizmind.eu

View solution in original post

1 Reply
Ivan_Bozov
Luminary
Luminary

If I understand correctly you are looking for fields containing GR. Try like

....

IF(WILDMATCH([Step Description], '*GR*'), 'GR ISSUE',

...

More about MATCH and WILDMATCH here:

https://help.qlik.com/en-US/sense/September2018/Subsystems/Hub/Content/Sense_Hub/Scripting/Condition...

https://help.qlik.com/en-US/sense/September2018/Subsystems/Hub/Content/Sense_Hub/Scripting/Condition...

vizmind.eu