Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
In my script, i was trying to restrict few fields as per the requirement.
I have a field "Freight Code".
I wanna set a flag "0" if "Freight Code" has letter 'S' in the end else flag "1".
So, i can fetch the fields only with "Freight Code" which doesn't have letter "S" in it.
Can some look into the application pls.
Hi,
you can either load the last letter as a separate field in the script (>> RIGHT([Freight Code], 1 <<)
or you can create a new listbox_object on the GUI using this same formula.
Voila, you can select > S < in this listbox and all the Freight_codes with an S at the end will be selected for you.
HTH
P.S.: Of course, you can also create a flag_field that will show 1 or 0, either in the script or on the GUI.
Hi,
you can either load the last letter as a separate field in the script (>> RIGHT([Freight Code], 1 <<)
or you can create a new listbox_object on the GUI using this same formula.
Voila, you can select > S < in this listbox and all the Freight_codes with an S at the end will be selected for you.
HTH
P.S.: Of course, you can also create a flag_field that will show 1 or 0, either in the script or on the GUI.
try
=if(right([Freight Code],1)='S',0,1) as Flag
So, can i use...
Where right([Freight Code], 1) <> 'S';
Yes, in a LOAD statement in the script, of course you can (as a hint, when you type a command and it does turn blue, then it will work - if it doesn't, you have either misspelt it or it doesn't work in the script - there are commands you can use on the GUI only like SET_analysis.
HTH
use
if (Lower(mid([Freight Code],len([Freight Code]),len([Freight Code])))='s',0,1) as Flag
THank you verymuch for the detail explanation
Thank you sir.
You are welcome
Sasi
you can use a listbox as in image
fabs(not Right([Freight Code],1)='S')
same expression in script