Because SambaPOS doesn’t take a standard approach and use the database ID as the “primary field” I have had to use email address as the primary field for my customer entites (other wise it wouldn’t be possible to have two customers called “John Smith”).
Using email address should work OK, but when it comes to my commission system, I need to have order tags with the order tag name matching the entity primary key. But, when I use an . symbol in the order tag name the entire order tag doesn’t appear as a selectable option.
Hmm… the DOT is a “SubTag” or “modifiers of modifiers” feature that was added with the debut of V5, so that is why you are having a problem with Tag Values containing a DOT.
Not sure how many people uses this feature, but it can be useful, and it was a request for something that resulted in this:
Hmmm - So I guess there’s going to be no way to overcome this. Maybe I will just hard code an additional .com in the rule.
I don’t think so, because I am using a rule that is triggered for an entire order, not each individual order tag, therefore I am using ORDER TAG LIST to read all the commission names and I don’t think there is an equivilant ORDER TAG DESCRIPTION LIST?
It’s OK, because these tags are only for my staff. I end up with a list of staff names who could have sold any particular item, but I need to link these tags the entity for the staff member. All my staff members who can recive commission have an email address stored of staffname@companyname.com - So fortunately I can hard-code this
Yes, but after your suggestion the other day I am changing all order states when the ticket gets paid then using this trigger to go through the orders one-by-one, as part of the order I have direct access to {ORDER TAG LIST} so I figured that made sense to use. I’ll take a look at this option…
If I only want to retireve one of the email addresses at a time, is it possible to get the report to return only the 1st, 2nd or third result? Or would I need to send a CSV output to some JScript to split the result?
I would really need to see your setup to offer good suggestions. But we can do some pretty funky things using just [=expressions] and inline JScript … something like the following might work in an Action as a parameter - I don’t know:
[='{REPORT ORDER TAG DETAILS:T.Description:(OT=Email) && O.MenuItemName="{NAME}":,}'.split(',')[0]]
[='{REPORT ORDER TAG DETAILS:T.Description:(OT=Email) && O.MenuItemName="{NAME}":,}'.split(',')[1]]
[='{REPORT ORDER TAG DETAILS:T.Description:(OT=Email) && O.MenuItemName="{NAME}":,}'.split(',')[2]]
EDIT: does not work as expected… it breaks the parser because of the nested [0] resulting in an output of just “]” … at least it does in Report Preview. The theory is sound however
Yeah, that’s that sort of think I was thinking, but before when I tried to access an array using square bracks inside a [= ] I couldn’t seem to get it to work. Maybe I left a typo in there… I’ll give it another go…
[='{REPORT ORDER TAG DETAILS:T.Description:(OT=Commission) AND O.Id=[:CommandValue]:,}'.split(',')[0]] Output: ]
[='{REPORT ORDER TAG DETAILS:T.Description:(OT=Commission) AND O.Id=[:CommandValue]:,}'.split(',')[1]] Output: ]
Any ideas? I had a similar issue with the CSV output of ORDER TAG LIST and that’s why I wrote small script to do the splitting via a CALL, but it would be nicer is it could all be done in one place…
Nope. That is part of the problem when we come up with this stuff. No way for Emre to predict how we are going to use something. He could probably fix it, but I don’t see it happening soon.
I am not sure if this help (I didn’t read the whole thing).
Can you use middle dot · instead of dot . in order tag. And use replace to inter change it.