Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I want to extract a particular portion of a string.So,can anyone tell me the code for it ?
Example-123TY-P1-00TY. In this i want only P1 to be displayed on the listbox .
hi
try like this =SubField('123TY-P1-00TY','-',2)
try this
=SubField('123TY-P1-00TY','-',2)
or try this
=SubField(YourField name,'-',2)
hi use the code
=SubField('123TY-P1-00TY','-',2)
Thank you . But, I also have the fields in these formats.... 10-P1-12,12-P2-302,100-P3-21 etc... I want to extract the P2,P1... strings.So,how i should i do that ?
Thank you . But, I also have the fields in these formats.... 10-P1-12,12-P2-302,100-P3-21 etc... I want to extract the P2,P1... strings.So,how i should i do that ?
You can try this code also
=SubField('123TY-P1-00TY','-',-2)
then in place of string use your field name,because what you want is the second part ,hence the code works well for you,
in list box, select expression and type
subfield(fieldname,'-',2)
then your list box will show only P1,P2,P3
find the sample file to see the solution