Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI i have a field Name PANACNO which his following values .
PANACNO
1:1-2-3-4-5
1:1-2-3-4-5-6
1:1-2-3/2:4-5-6
1:1-2-4-3
1:1-2/2:3-4
1:2-1
1:2-1-3
1:2-3
1:2-3-4
and my statement is following
if(len(PANACNO )>3,
mid(PANACNO ,
Index(PANACNO ,'-',-1) ),1)
which will give me value but with(-). i only want number.
please have a look
What are you wanting to get?
Last number ,basically
try subfield(PANACNO,'-',-1)
No it doesnot give me any value beside ( -)
what result do you expect for?:
PANACNO
1:1-2-3-4-5
1:1-2-3-4-5-6
1:1-2-3/2:4-5-6
1:1-2-4-3
1:1-2/2:3-4
1:2-1
1:2-1-3
1:2-3
1:2-3-4
If you want to fix your expression:
if(len(PANACNO )>3,
mid(PANACNO ,
Index(PANACNO ,'-',-1) )+1,1)
Trying to capture
1:1-2-3-4-5 5
1:1-2-3-4-5-6 6
1:1-2-3/2:4-5-6 6
1:1-2-4-3 3
1:1-2/2:3-4 4
... works for me:
LOAD SubField(PANACNO,'-',-1) as FIELD INLINE [
PANACNO
1:1-2-3-4-5
1:1-2-3-4-5-6
1:1-2-3/2:4-5-6
1:1-2-4-3
1:1-2/2:3-4
1:2-1
1:2-1-3
1:2-3
1:2-3-4
];
right(PANACNO,1)