Hi all HAPPY NEW YEAR AND ALL THAT JAZZ!!!!
Now down to the issue lol...
My users are increasingly using special characters in the item number ie P456/2(1).
Having told them time and again that this casues issues when filtering i have given up on human common sense. ](*,) I want to prevent this from occuring again by implementing better text string control
I can see two ways of doing this :
1) Via the properts of the Filed using CharAllowed and ValuesAllowed. I can specify exactly which characters however this meant typing the alphabet in both case setting and all numbers including valid special characters such as full stops and unsersore etc.
2) using STRPOS to search the string for each special character one read at a time
As far as i can tell both are extreemly time consuming the 1st to set up and the 2nd will increase the number of reads of the record before accepting it therefore slowing the validation of the field
Is there a way to search the string for a predefined set of characters and reject the field accordingly???
Thanks in advance
M@
I have seen the future and it's egg shaped.
0
Answers
http://ssdynamics.co.in
if i had my way it would happen lol...
I have seen the future and it's egg shaped.
Unfortunately our system is over 6 years old and the salespeople are now reliant upon naming our Item numbers the same as the customers part number. To change this now would mean re-educating the entire salesforce.
I have used the Number Series codeunit by adding a function that checks for each special character one at time but i thought i was being a little bt unimaginative. My code does work i just wondered if there was a better way. My code currently looks like so..
ONVALIDATE
NoSeriesMgt.PreventSpecialCharacters("No.");
i := STRPOS(ItemNo,'@');
IF i <> 0 THEN
ERROR(''You cna not insert %1 in this field!','@');
this is then repeated for each special character.
I just thought this was a little basic and there had to be a better way.
I have seen the future and it's egg shaped.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Thank you all.
This can be marked as solved.
I have seen the future and it's egg shaped.
This is on you - just change the subject of your first post... ;-)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.