Hi Folks,
I need to encrypt a field. For example i enter a credit card no. 1234-4445-3444-4444. As soon as the user leaves the field, i would like to have the field encrypted xxxx-xxxx-xxxx-4444. But the value in the table should be 1234-4445-3444-4444. Is this doable? Any help is highly appreciated.
Thanks
Best regards
Suresh.
0
Comments
andre
But you didn't see the real content when you type in.
On each form which displays the field you use the OnFormat Trigger of your "Credit Card" field and do anything with the value what you want
But do it only with the parameter "Text" of the Trigger :!:
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
If you use the way over the OnFormat Trigger you must disable the Zoom because the OnFormat Trigger only works on the control not in the Zoom.
But if you use the way over the Password Text you didn't see anything (when you type in the Number / when the value is shown in the field / when the User opens the Zoom).
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]
is connected to the Database table, once you enter
a value in this field we transfer its contents to
the text box and make the CCNumber (DB Field) invisible.
CCNumber - OnFormat(VAR Text : Text[1024];)
IF NOT (CCNumber = '') THEN
BEGIN
CurrForm.CCNumber.VISIBLE := FALSE;
CurrForm.BlankCC.VISIBLE :=TRUE;
END;
Form - OnAfterGetRecord()
BlankCC := COPYSTR(CCNumber,1,4);
Form - OnNewRecord(BelowxRec : Boolean)
IF CCNumber = '' THEN
BEGIN
CurrForm.CCNumber.VISIBLE := TRUE;
BlankCC := '';
CurrForm.BlankCC.VISIBLE := FALSE;
END;
Variables
Name DataType Subtype Length
BlankCC Code 10
Controls
1 TextBox (Used to store 4 digits)
1 Label (Used to Identify Credit Card Number box)
1 Field (CCNumber)