Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

cdb
New Contributor II

Fetch the Index of the string

Hi,

I need to fetch index of lang code .Postion of the language code can be different ,so I need to search id the language code provieded in my mapping exist ,if it does I need to get the index of it.

languages:

mapping load *

Inline [

Code, Lang

de-DE, German

en-US, English

es-ES, Spanish

fr-FR, French

it-IT, Italian

ja-JP, Japanese

ko-KR, Korean

nl-NL, Dutch

pl-PL, Polish

pt-BR, Portuguese

ru-RU, Russian

sv-SE, Swedish

zh-CN, Chinese

tf-TR,Turkish

zh-TW,Chinese

];

Sample Filename where we need to search the language code and return the index

  

$/Ver12.00/ua_rel/sense_4.2/doc/APIs/RepositoryServiceAPI/de-DE/Content/RepositoryServiceAPI/RepositoryServiceAPI-Tag-Create.htm
$/Ver12.00/ua_rel/sense_4.2/doc/Deployment/en-US/Content/Deployment/Deploying-QSM-per-app-vpn-AirWatch.htm

Any help will be appreciated

2 Replies
shraddha_g
Honored Contributor III

Re: Fetch the Index of the string

Tyr Subfield (Filename,'/', -4)

cdb
New Contributor II

Re: Fetch the Index of the string

Thanks Shraddha ,It worked but I had to tweak a  bit to make it correct.

Shraddha Gajare <span class="icon-status-icon icon-partner" title="Partner"></span> wrote:

Tyr Subfield (Filename,'/', -4)

ApplyMap('languages', Subfield (@1,'/', -3),

ApplyMap('languages', Subfield (@1,'/', -4),

ApplyMap('languages', Subfield (@1,'/', -5),

ApplyMap('languages', Subfield (@1,'/', -6),

'Unknown')))) As LangN

Community Browser