Encrypting a Field
Sbhat
Member Posts: 301
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.
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
-
What about linking a textbox to a variable, which then writes to the table and replaces the original value with ****?
andre0 -
There are two possible ways:
- Set the property "Password text" of the field to "Yes", then the field has the same behaviour as any password field.
But you didn't see the real content when you type in.
- Let the field be a "normal" text field.
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 :!:
Timo Lässer
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]0 - Set the property "Password text" of the field to "Yes", then the field has the same behaviour as any password field.
-
Don't forget to disable the Zoom, Ctrl-F8...0
-
You are right!nicklasl wrote:Don't forget to disable the Zoom, Ctrl-F8...
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).Timo Lässer
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]0 -
Basicly if the field is empty show the Input box that
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)RKB0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
