Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
bobbydave
Creator III
Creator III

Compare substring in ApplyMap()

I have a mapping table.

Keyword        App

 xxxxxx            .NET

YYYYYY            APACHE

ZZZZZ             OFFICE

 

I have a table then and within this table, column H has

 

Table:

Load H

From

X.xlsx

 

H contains output:

sdfsdxxxxxxdsfdsf

ERWRWWQYYYYYYAEWRA

IOPIOPIZZZZZOIPOIO

 

I need to be able to check if column H has the keywords and then bring in the App as an object of Table.

 

TIA

 

 

 

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

Something like this?

MappingTable:
Mapping
LOAD Keyword,
	 '/' & App & '\';
LOAD * INLINE [
    Keyword, App
    xxxxxx, .NET
    YYYYYY, APACHE
    ZZZZZ, OFFICE
];

Table:
LOAD H,
	 TextBetween(MapSubString('MappingTable', H), '/', '\') as App;
LOAD * INLINE [
    H
    sdfsdxxxxxxdsfdsf
    ERWRWWQYYYYYYAEWRA
    IOPIOPIZZZZZOIPOIO
];

image.png

View solution in original post

5 Replies
sunny_talwar

May be look here

MapSubString

bobbydave
Creator III
Creator III
Author

I've used MapSubString but I keep getting the value of H as the full line of the string returned when all I want is the keyword.

sunny_talwar

Something like this?

MappingTable:
Mapping
LOAD Keyword,
	 '/' & App & '\';
LOAD * INLINE [
    Keyword, App
    xxxxxx, .NET
    YYYYYY, APACHE
    ZZZZZ, OFFICE
];

Table:
LOAD H,
	 TextBetween(MapSubString('MappingTable', H), '/', '\') as App;
LOAD * INLINE [
    H
    sdfsdxxxxxxdsfdsf
    ERWRWWQYYYYYYAEWRA
    IOPIOPIZZZZZOIPOIO
];

image.png

pradosh_thakur
Master II
Master II

Hi Sunny,

why is '/' AND '\' needed to be concatenated to App?
Learning never stops.
sunny_talwar

MapSubString will replace Keyword with App in the string... in order to extract just the app (using TextBetween), I added / and \ to the App.