Inputbox string - remove special characters
Forums
Hi Brian,
I'm back again :-)
I'm running a script and I would like user to be able to enter a case reference which is stored as a string.
Much later in the script this will be used to create an output filename.
The following lines allow me to get the input, tidy it a little, and then pass it to create the filename.
caseref = InputBox("Enter your case reference", "Case Reference", " ", 815,475)
caseref = UCase(LTrim(Left(caseref, 20)))
dbName = pfolder &"\Calculations for" +caseref +".IMD"
All of this works without any problem.
However, it is dependent on the user not entering any of the special characters that are not allowed to be used in a filename.
I'm wondering is there something I can use here that is similar to the IDEA @Strip function?
Any advice would be much appreciated.
All the best,
Phil
Hi Phil, yes that should…
Hi Phil, yes that should work. I tried it out and it seems to be getting what you are looking for. You need to replace the @ with an i in order to use the function in IDEAScript.