Basic Switch User by Swipe/Numberpad Entered Event

Just had a play and looks like the ask question take focus away from numberpad even after closing it @emre not sure if this is a bug not not? Use ask question and numberpad allot at hotel and never noticed this before so not sure if it’s new as hotel on older version or specific to login flow, will do some more testing tomorrow.
Ask question seems to take focus away from being able to enter numberpad value untill you click on either the numberpad or the ticket/order list section. Even adding orders or changing category or clicking on header/shell section at top doesnt restor numberpad focus.

1 Like

Exactly the same on my system

On a separate issue the switch user change you’ve made works perfect if there are no orders on the ticket. Have you tried it with an order on the ticket, for me it doesn’t log the new user in and I’ve had to use a delay to login for it to work.

It’d be great if we could get it to log in immediately as it does with no orders on ticket like in your video above

I’ve started to simplify it so I’ve removed the ask question prompt and literally just add an order which when the ticket is created adds a ticket tag for user so ticket can close on switch user

At one point I had the ticket close and user switch (you see the user switch at bottom right) and then samba logs out lol

I’ll do some more testing today maybe adding a save ticket action before closing and logging out might help, it’s be great to get it running immediately when orders are added to ticket without the need for a delay

So I’ve tested this again and with no orders it’s lightning fast, if the ticket has an order the actions in the switch rule don’t execute in order, for example when the new user swipes in the rule processes these actions in the correct order they are in the rule

  1. Closes ticket
  2. Logs out current user
  3. Logs in new user

If an order is added to the ticket when the switch rule is fired the actions appear to happen in a different order because the login screen appears out of place as described below:

  1. Ticket closes
  2. Current user is logged out and new user is logged in (we can see the usernames change in the bottom left so log out and in have happened without actually displaying the login screen)
  3. After the users have been logged out and in as above the login screen then appears meaning you have to login again

It seems the login screen is appearing at the wrong time. The action that fires to login the users is set as TRUE to run in background but it’s doesnt appear to wait for the close ticket and logout actions to fully complete before it is activated causing the login screen to appear at the wrong time

Like I say if the ticket contains no orders there no issue it works perfect, but when there’s orders on the ticket we experienced the behaviour above

@emre could the background setting as TRUE not fully be waiting for other actions to complete even though on screen they look like they have?

I can bypass this error by adding a 2 second delay in the login action but if possible I’d like it to work immediately as it does when no orders are on the ticket as it’s be much more fluid and instant

@RickH I got it working just before hitting the hay last night other than the issue with numberpad focus by moving the login execute command into my logout command rule so it execute background truw logout after switch user then in the logout rule there is background execute login command with constraint that logout command was passed a value.
Will screenshot later.

Brilliant cheers Joe :grinning:

At least I think I did, was late, will check later. LOL

1 Like

@RickH
So yer, I got it working to the point the ‘you have x tickets on hold’ prompt effects focus.
If you drop the login with open tickets prompt or force open the one open ticket which I think I will do it should work.

My screen recorder seems to be playing up… doesn’t show first few seconds and bit jumpy… Will drop some screenshots now.

Could be cleaned up but was testing the theory.
Also note for some reason this time round I have to ‘quote’ the [:NumberpadValue] although it worked before without…
Know I have doubled up on close ticket but thats from the existing database which has rules without close in the first rule so you wouldnt need one of the two…

Something else I noticed, in the numbered pad entered rule th customer constraint that’s greater than zero. Can that be set to be equals the pin field? At the moment you can enter any number and it will log out but not in if that number doesn’t exist

I might need to add another constraint to that as how will it know if a barcode is being scanned and not a pin entered for switch iser

1 Like

Hmmm, the report expression should return a count of the number of pins mattching which should be either 0 or 1… Maybe we need to wrap in a TN()…

Nope. report seems to always return 1…

Before I changed it to your expression I just used 7 digits so had numerberpad length equals 7 instead. That solves the issue of it not interfering with other numberpad entered rules as it only fired that rule if the number of digits entered was 7

But still allowed a random 7 digit number to logout but not in again of that number wasn’t an actual pin

I was cutting to that with the report expression doing both in one go by purly validating against pin…

The SQL is good, just trying to work out the issue.

image

Am a bit puzzled. Obviously not using report expression correctly…

1 Like

Or you could call it a security feature, if someone tried to type a number switch user if it’s incorrect it just logs you out so there’s no access to the pos haha :grinning:

1 Like

{REPORT SQL DETAILS:SELECT Name FROM Users WHERE PinCode = ‘[:NumberpadValue]’:F.Count}

Is Not Null

That works

@emre cant tell if this is an issue with the report sql expression and the count function or just me using it incorrectly… Seems to work fine without count.

Another quickie in the first screen shot
https://forum.sambapos.com/uploads/default/original/3X/3/f/3f41c8c508a10efbe606c95534b969d7df923ceb.png

The first action with command of switchusercommand whats that doing I don’t see a rule with that auto command name?