Scan Key Fob for Customer Select

It’s me again. :slight_smile:

I’ve finally finished my Membership Portal so now I’m going back and focusing on things that work but not exactly as was originally designed.

I’d like to be able to scan our member key fobs to select the associated entity within the Entity Screen I’ve made. Currently we have to actually type it in by hand and select the entity from the list. I tried scanning the fob directly into the search widget but that for some reason triggers my rule for scanning the id into the numberpad even though I’ve removed the mapping from those rules.

I’d honestly like to just have an editor widget that executes a rule to search but I can’t seem to make the ends meet.

I tried Cazz’s method he used for his Customer Screen. I also tried simply setting the Entity Screen to a Member (the Entity Type) and adding an editor widget that executes an Entity Search. But that also didn’t work (but I didn’t think it would).

I think all I need is to be able to obtain the Entity ID from the Entity name and pass that to my existing automation. I see several SQL scripts in the forum, but I tend to shy away from those because doing anything that directly could change my database makes me nervous to do without some sort of guidance. However, out of curiosity - would it be something as simple as…

SELECT [Id] FROM [Entities] WHERE [Name]=‘EntityfromSamba’

I know it couldn’t be that easy. My knowledge of SQL is very minimal.

As always thank you very mucy for any suggestions!

  • Christopher

SELECT statements in SQL wont update or change anything in your database

Though Id probably want to put SELECT TOP 1 … in case your SQL returns multiple records, which you will have to handle separately

Can you share screenshot of your [:NumberpadEntered] rules or however they are called I cant remember of the top of my head

My numberpad rules are meant for selecting the customer from the numberpad on the ticket screen. Do you need to see those? I wasn’t aware that that rule applied outside of the POS module so I removed them and tried for a different approach using an Editor Widget and Automation command. Right now no matter where I am within Samba (except for settings) when I scan a fob it automatically takes me to the ticket screen and adds the entity to a ticket… I’m closing up the bar for the night so I’ll get those posted as soon as I finish up.

Which ever rules are that are handling these process. I cant really help without understanding what rules there are that are doing this.

[:Numperpad] rules wont do anything except add order to ticket if it matches some barcode of a product

So whatever is causing this - is most likely rules you created






I also saw this … Get the selected entity from a Search Entity widget - #5 by Posflow but It looks like you’d need to have already selected an entity from a search for it to work. Is it possible to do this without utilizing a search widget…for my needs that would be perfect. eg - here is the Member ID of an entity return with the entity ID.

Is this what you are looking for? It’s not a key fob, I just typed in their phone number. I would guess a key fob would work the same.

Samba.Presentation_kMzNz1QRIH

The yellow “Look Up” button is not used, it automatically updates after about a half second when it finds a customer.

Here is the setting for it:
Editor Widget:
Samba.Presentation_AXvemFLjfA
I use the Edit Mask to hold off running the Command until 10 numbers are inputted (with or without dashes). I’m not sure if you will have people hand typing in the key fob number, if not, it would not be needed. Also, in my setup email does the same thing, user can input either email or phone number.

Rule:


Each Program Setting calls up a Customer Field. The last Action updates all the widgets.

I know there is a Set Widget Value action, but I have never had luck using that action (I’m probably using it wrong).

1 Like

I think this may be exactly what i need! if I wanted to incorporate this into my existing workflow (we need to be able to scan or look up) is it possible to change the command value to something like {:Member ID} or the equivalent for the custom data field so I can pass that to my automation instead of the Entity ID? or add some ‘[:CommandValue]’ != ‘’ constraints and corrolating rules for the new automation? or both? Or would that not work? Right now everything is looked up by the Entity ID by way of report tagging eg. {REPORT SQL DETAILS:SELECT [Name],[CustomData] FROM [Entities] WHERE [Id] = [:CommandValue]:F.CustomData(Name=State)Value}.

I think the only problem I’m going to run into is the CR encoded in the keyfobs. I’m not sure how Samba will handle that. Especially since I cant seem to get those numberPadValueEntered rules to stop firing.

Thanks for your help, buddy!

Also, out of curiosity - Are the tabbed sections in your screenshot above native to Samba or is that something you built yourself?

Here is my email quick lookup. I have the phone number as the primary field. I’m using Samba’s reports to get the information using email as the expression in the report tag.

I’m using the email as the command value. Then using the command value in the samba reports tag.

You will want to do something similar, but use the key fob as the command value. You could add a rule constraint to see if an entity exists. Maybe something like:
{REPORT ENTITY DETAILS:E.Name:(ET=Customers) && E.GetCustomData("Email") == "[:CommandValue]"} Is Not Null
And another rule with a constraint of:
{REPORT ENTITY DETAILS:E.Name:(ET=Customers) && E.GetCustomData("Email") == "[:CommandValue]"} Is Null
Action:Show Message - Customer not found.

Do you have the key fobs and the reader? If you open a text editor open, can you scan a fob and it show up in the text editor? (Notepad may be a little flaky, I know with barcodes, only part of the scan will show up, until other keys are pressed, then the rest of the scan will show up.) If the fob number shows up in the text editor, it should work in Samba. I don’t have a fob or reader to do any testing.


In your image, there is an option in the setting for the editor widget to “Should Focus”. I believe the curser will be placed in that field when the screen is displayed.

The tabs native to Samba and is available when using the entity screen setting View Mode: Layout. It looks like you are using Custom. They are not available in custom…not that I am able to find. Layout mode takes a little patients to get use to when designing especially when you have allot fields and want to move them around, things can get really messy really quick. But it is quicker to get things lined up. If want to see what it looks like, there is hamburger menu option in the upper left to access that option:
Samba.Presentation_CsdycZQ3hg

Samba.Presentation_qvjoxwyT2X

1 Like

Here is the email in action:
Samba.Presentation_vxcMeBRPLa

Side note about layout view: in image above, the 2 gray bars are “Group Boxes” (labeled “Child Information” and “Party Information”.)

Thanks a million! I just needed a nudge in the right direction! Just when I finally think I may actually be getting good at this, Samba throws me a curve ball. A good reminder of how far I still have to go. haha One thing that I’ve gained from deciding to dive deeper into customizing for our needs is the ability to think outside the box…and then think outside THAT box. haha. It really does open your mind in so many aspects of day to day life. It’s definitely tightened the reigns on my personal possibilities gap within the software itself.

Back to your screenshots. I really like how clean, professional and efficient your work is. Everything you’ve shown me over the years has always looked very slick and very well thought out. I just wanted to throw that out there. Something for the newcomers to aspire to. :slight_smile:

Thank you again! Everyone have a great weekend!

Yes, I do. I did actually know about using notepad to find the numbers stored in the fobs. What i’m running into is the hard carriage return (CR) after the number. It works great for logging in and as keys for our access control system but that CR can reap havoc on any automation I try that utilizes the “swipes” from the fobs. With barcode scanners you can turn that on and off, but so far I don’t know of a way to do that with the readers I have.

I just tried using a barcode scanner with a Carriage Return (CR), to scan the phone number into the field. No weird effect, just brought up the information as normal. My guess it should work the same with a key fob.

Thank you for your kind words. I have seen some of your work, don’t sell yourself short. What I like about Samba is having the freedom to design anything needed to accomplish a task or solve a problem. I know I have turned SambaPOS from just a POS into more of a central information system. I think I’m sitting at just over 400 rules in my system. And I’m still not done coming up with new ideas to add to Samba.

1 Like

You were right. The CR only causes a problem in the Entity Search Widget. When using the Editor Widget it doesn’t seem to matter.

:heavy_check_mark: Issue 47 solved. Only 230 to go. :slight_smile:

1 Like