[SOLVED] How do I hide all but the last four digits with either a "*" or a bullet?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
karmacomposer
Posts: 361
Joined: Wed Apr 27, 2011 2:12 pm

[SOLVED] How do I hide all but the last four digits with either a "*" or a bullet?

Post by karmacomposer »

How do I hide all but the last four digits with either a "*" or a bullet?

I have a SSN and when a user reads it back (database style), I need the LiveCode app to hide all but the last four digits with either a "*" or a bullet.

From my last question, and thanks to Bogs, I see that a item delimeter of "-" and choosing the first 5 numbers out to give me what needs to be masked, but how do I mask/replace the numbers with another character?

Thank you.

Mike
Last edited by karmacomposer on Fri Jul 20, 2018 5:53 am, edited 1 time in total.
ClipArtGuy
Posts: 265
Joined: Wed Aug 19, 2015 4:29 pm

Re: How do I hide all but the last four digits with either a "*" or a bullet?

Post by ClipArtGuy »

Code: Select all

set the itemdelimiter to "-"
   put "***" into item 1 of fld "yourSsnField"
   put "**" into item 2 of fld "yourSsnField"
karmacomposer
Posts: 361
Joined: Wed Apr 27, 2011 2:12 pm

Re: How do I hide all but the last four digits with either a "*" or a bullet?

Post by karmacomposer »

Thank you yet again!

Mike
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10502
Joined: Wed May 06, 2009 2:28 pm

Re: [SOLVED] How do I hide all but the last four digits with either a "*" or a bullet?

Post by dunbarx »

Hi.

There are other threads on this. It is far better to hide the characters themselves as they are entered, and if you want to leave the last four digits in the clear, then well and good.

See "Best way to validate SSN"

Craig Newman
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10502
Joined: Wed May 06, 2009 2:28 pm

Re: [SOLVED] How do I hide all but the last four digits with either a "*" or a bullet?

Post by dunbarx »

Aha.

I see you started that thread.

But if you have the first, much better, solution, why do you need the second?

Craig
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: [SOLVED] How do I hide all but the last four digits with either a "*" or a bullet?

Post by Klaus »

Mike, Mike, Mike... 8)
karmacomposer
Posts: 361
Joined: Wed Apr 27, 2011 2:12 pm

Re: [SOLVED] How do I hide all but the last four digits with either a "*" or a bullet?

Post by karmacomposer »

@Klaus:

I know I know. I'm trying to knock out this prototype so I can get all you LiveCoders that have agreed to work with us a bunch of work (lol).

We have 6 clients waiting for me to finish it so they can go with us.

I'm ALMOST done.

Mike

P.S. NDAs are done but we are going through a necessary name change to the company - for legal reasons - so right after we decide on the new name, we will get the NDAs out.
Post Reply