Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have different form of medical Numbers ( '2226' , 'MQ234' )
But when i do a concat code such as Id & '-' & [Medical Number] the format i receive for the ones 2226 is 0000 2226
how can i make it not do that ???
Nothing change just try the below code with current script that yo use for concat
For this
LocationID & '-' & [Medical Record No. :] & '-' & Date as FilterID,
Try This if length is 8
LocationID & '-' & if(len([Medical Record No. :])=8,NUM([Medical Record No. :]),[Medical Record No. :]) & '-' & Date as FilterID,
Regards
You can use text() function to handle this situation
QlikView randomly added a leading zero to one of the text fields. This solution works for my situation. Thanks!
Hello!
Try a Len() to indicate that values are what they appear. I mean that Len(509)=3. And if it's true you can try to use it in first iteration:
LocationID & '-' & right([Medical Record No. :],len([Medical Record No. :])) & '-' & Date as FilterID
or
in the second iteration (after you've got 00000509 but len([Medical Record No. :])=3):
subfield(FilterID,'-',1)&'-'&subfield(right(FilterID,len([Medical Record No. :])),'-',2)&'-'&subfield(FilterID,'-',3)
or
you can try to multiplicate [Medical Record No. :] by 1:
LocationID & '-' & [Medical Record No. :]*1 & '-' & Date as FilterID
or
use num() function
LocationID & '-' & num([Medical Record No. :],'#') & '-' & Date as FilterID
maybe some of this helps. If it wont, then we will think next