Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

arusanah
Contributor II

help with Expresssion

i am trying to concatenate two fields as

[Payer.Name] &'('& [Payer.Number] &')' as Payer.Name1

this expression is not working for me

Iget output as - ABC(1760)

whereas it should be ABC(1760)

i tried using purgechar(Payer.Name,'-') it replaces ' - ' with '  ' '

trim gives same output as origanal expression one .

can anybody help?

:(

7 Replies

Re: help with Expresssion

Try this may be:

Replace([Payer.Name] &'('& [Payer.Number] &')', '- ', '') as Payer.Name1

Partner
Partner

Re: help with Expresssion

Hi

Just tried your expression and it looks ok

Data:
Load * Inline
[
Payer.Name, Payer.Number
ABC, 1760
]
;

Data2:
Load
[Payer.Name] &'('& [Payer.Number] &')' as Payer.Name1
Resident Data
;

Output =

Have you checked your payer.name data? Can you post the source data?

Andy

Re: help with Expresssion

   TextBetween( [Payer .Name],'-','') &'('&  Payer.Number &')' as Payer.Name1

arusanah
Contributor II

Re: help with Expresssion

doesnt work for me

in source Payer Name is -  'ABC'

i tried all functions to get rid of quotes  but not working

Re: help with Expresssion

Will you be able to share a sample?

antoniotiman
Honored Contributor III

Re: help with Expresssion

Try

PurgeChar([Payer.Name],'-'&Chr(39))

Regards,

Antonio

vishsaggi
Esteemed Contributor III

Re: help with Expresssion

Hi Arusanah,

If the source contains is definitely - 'ABC' then use below as a work around. Let me know if this works

Load mid(Payer.Name,4,3) & '(' & Payer.Number & ')' As ConcatenatedPayer;

V.