Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Padding and char conversion in qlikview

Just a clarification are the two statements allowed in qlikview?

TO_CHAR("GTS_SHORT_IBT")

If (RPAD("REPORTTYPE", 4) = 'PAID' , 'MDR PAID')

thanks in advance

2 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

I've never seen them but check the F1 help. What are you trying to do? There's probably another function that will suit...

multiview
Creator II
Creator II

To convert to text you can use TEXT function. TEXT(GTS_SHORT_IBT)

And you can use repeat function to have your values padded :

LPAD :

REPEAT('0', (10 - LEN(MYVALUE))) & MYVALUE AS NEWFIELD

RPAD :

MYVALUE & REPEAT('0', (10 - LEN(MYVALUE))) AS NEWFIELD

Change '0' to the character you want to padd with. And change the number 10 with your field's max length.

I hope this helps!

Regards

MultiView