Make User PIN Alphanumeric

@emre i just came across this in a post from 4 years ago!!

emre

Sep '14

sukasem try [=’[:CommandValue]’.substr(1,6)]

I thing you are trying to strip mag card control chars. If you tell us more about your implementation I can give more info about how to deal with that.

Thats what i am trying to do, strip the first and last characters of the mag card control

The only thing this is affecting is my switch user setup where it uses the number pad entry on the pos screen. the login screen pin field and admin pin fields seem to automatically strip the control characters from the start and end and they work fine.

The numberpad entry on the pos screen doesnt do this, so for example i have a user with pin 2575613, when encoding this to a mag card it outputs as %2575613?

%2575613? works fine on the main pos login screen and logs in user with pin 2575163
%2575613? works fine for admin pin confirmation and accepts 2575613 as a pin

My switch user setup relies on a user pin being entered on the numberpad field on the pos screen, if i manually type 2575613 everything works perfect and current user logs out and user with pin 2575613 gets logged in

This obviously doesnt work when i swipe my mag card as it inputs %2575613? which isnt a user pin so doesnt work. How can a change the actions below to strip off the 1st and last characters (% and?) so the rule thinks we have just entered 2575613 and not %2575613?

image

So i think in need to amend [:NumberpadValue]:F.Count in the rule constraint to be numberpad value minus the first and last digit

and need to change the action command value from [:NumberpadValue] to numberpad value minus fist and last digit

ive tried a few things you suggested in the topic ive reviewed from 2014 but im not doing it correctly, not sure on what the correct string should be to amend the inputted value