Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Inline load and string search

Hi

I want to search a field for an occurrence of specific keywords and then set a flag if found.

Thinking that I want to use an inline load to pull in a list of keywords and then was going to use index to search the string. I can get it to work ok without the ApplyMap e.g. if((index(@36:n,'Error:') >0 )  , 'ERROR', 'OK') as ErrorFlag but at a loss on what the syntax is for using the  ApplyMap.

Was trying to use something like :

KeywordsMap:

MAPPING LOAD * INLINE [

    F1,F2

    Error:, 9999

    Failure:9999

    ];

  if(index(@36:n, ApplyMap('KeywordsMap', @36:n)) <> 0   , 'ERROR', 'OK') as ErrorFlag

I've searched but can't see anything specific to this and being new to Qlikview not sure if this is best approach or if there's a better alternative.

Thanks

J

1 Reply
christian77
Partner - Specialist
Partner - Specialist

Hi.

Try to use SubStringCount(YourField).

If you are using a MAPPING, don't use IF clause.

applymap('KeywordMap',YourField)          as ErrorFlag

Try to rename those fields called @..


luck