Hi Joe,
It's not quite what you asked for, but it might start you off:
I have a customisation on the creation of new Customers. I like all CustIDs to be in capitals and I don't like apostrophes - back in 8.0 they caused a problem, so I added a "BeforeFieldChange" event and added in the following code:
Select Case args.Column.ColumnName
Case "CustID"
' Convert Account Ref to Uppercase
args.ProposedValue = args.ProposedValue.ToUpper()
if InStr(1, args.ProposedValue.ToString(), "'", CompareMethod.Text) > 0 then
messagebox.show("Don't use an Apostrophe in a Customer Code." + chr(13) + "Please delete this record and re-enter.", "Error.", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
Case Else
End Select
You could easily stick in a loop to check each that character in args.ProposedValue is of the proper format. I never looked into actually stopping the user continuing, but, as I said it might start you off.
Nigel.
________________________________
From:
vantage@yahoogroups.com on behalf of Rojas, Joe
Sent: Mon 02/06/2008 18:25
To:
vantage@yahoogroups.com
Subject: [Vantage] Control Part Number Format
Hello,
I need a way to restrict the format of part numbers as they are entered
into Part Entry.
We have, on paper, data entry rules for Part Numbers.
Only numbers, capital letters, and hyphens are allowed.
The problem is that some people are not following the rules.
Before I recreate the wheel, does anyone have a BPM or customization
that performs these type of checks before saving that they would be
willing to share?
Joe Rojas
Information Technology Manager
Symmetry Medical New Bedford
P: 508.998.4575
C:508.838.4717
F:508.995.9597
joe.rojas@... <mailto:joe.rojas%40symmetrynb.com> <mailto:
joe.rojas@... <mailto:joe.rojas%40symmetrynb.com> >
[Non-text portions of this message have been removed]
----------
Hi Joe,
It's not quite what you asked for, but it might start you off:
I have a customisation on the creation of new Customers. I like all CustIDs to be in capitals and I don't like apostrophes - back in 8.0 they caused a problem, so I added a "BeforeFieldChange" event and added in the following code:
Select Case args.Column.ColumnName
Case "CustID"
' Convert Account Ref to Uppercase
args.ProposedValue = args.ProposedValue.ToUpper()
if InStr(1, args.ProposedValue.ToString(), "'", CompareMethod.Text) > 0 then
messagebox.show("Don't use an Apostrophe in a Customer Code." + chr(13) + "Please delete this record and re-enter.", "Error.", MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
Case Else
End Select
You could easily stick in a loop to check each that character in args.ProposedValue is of the proper format. I never looked into actually stopping the user continuing, but, as I said it might start you off.
Nigel.
________________________________
From:
vantage@yahoogroups.com on behalf of Rojas, Joe
Sent: Mon 02/06/2008 18:25
To:
vantage@yahoogroups.com
Subject: [Vantage] Control Part Number Format
Hello,
I need a way to restrict the format of part numbers as they are entered
into Part Entry.
We have, on paper, data entry rules for Part Numbers.
Only numbers, capital letters, and hyphens are allowed.
The problem is that some people are not following the rules.
Before I recreate the wheel, does anyone have a BPM or customization
that performs these type of checks before saving that they would be
willing to share?
Joe Rojas
Information Technology Manager
Symmetry Medical New Bedford
P: 508.998.4575
C:508.838.4717
F:508.995.9597
joe.rojas@... <mailto:joe.rojas%40symmetrynb.com> <mailto:
joe.rojas@... <mailto:joe.rojas%40symmetrynb.com> >
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]