We've been required to mask out all but the last 4 digits of users
social security numbers in our app anywhere they show up.
I've found that for datawindows that are not updateable, it's easy
enough to just put in a format for the column:
"*****" + right(social_security_nr, 4)
It works great. However.
I have a datawindow that is created on the fly using SyntaxFromSQL
which contains the above social_security_nr field.
The closest I can get is based on the format example in help:
this.dw_sheet.Modify('social_security_nr.Format = "*****" +
right(social_security_nr, 4);"None"')
The problem is that the field value is not getting pulled. In the
output DW I'm just getting a column full of *****. What's the proper
way to append the asterisks to the last for characters of the actual
field value in a modify statement? (or in a setformat).
Thanks!
John
I tried doing a physical mask in the SQL, but the problem is that the
users can select a row in the DW in order to delete it from the
database. Therefore when the window tries to delete the person (based
on the SSN) it fails since "*****4567" is not a valid SSN. The format
property looks to be exactly what I want, it's just the fact that it's
a dynamic (and generic) window that's giving me the problem.
E.g.
SELECT '*****'+right(social_security_nr,4) as 'display_ssn',
social_security_nr
Set your update properties on the real column and display the fudged one
('display_ssn').
Brad
I just tried that and it looks good. However I did find that the
"delete" function in the window does not work AT ALL, even when
unmodified. So this is obviously a window that nobody ever uses since
there has not been a complaint about the bug. LOL
Regardless I'll settle for that, thanks.
If anyone does however figure out how to do the format mask above, I'd
love to see how it's composed.
this.dw_sheet.Modify('social_security_nr.Format = "~t*****" +
right(social_security_nr, 4);"None" ')
"TomBodet" <TomB...@gmail.com> wrote in message
news:1160754500.5...@i3g2000cwc.googlegroups.com...