Is local set to false works and it is easy to test that. I use that setting extensively in multiple different configurations so I know without a doubt it’s working. There is something specific to your setup that is not working as desired.
In fact I use it for the exact same thing your trying to do and it has never not worked. I call mine order # instead of serial number but it’s all the same. I think your issue is something to do with your RDP setup.
Yes, you can create many Scripts. And the Scripts can be JScript or SQL. And those scripts (JScript) can have multiple Functions/methods within them. One JScript script could contain Function(s) that have the same name as Functions in another JScript script.
The Handler is to know which Script you are referencing.
SQL Scripts always have this format for the Handler using leading @@:
@@handlerName
JScript Scripts just have a string for the Handler:
handlerName
Then to fire a Function in a JScript, you call it by invoking:
handlerName.functionName(funcParameters)
You can also “call” Scripts using the {CALL:X} Tag, for example, in a Printer or Report Template, or in a Rule:
{CALL:handlerName.functionName(funcParms)}
The result (return value) of the Script will be used in place of the {CALL:X}. So in the case of the JScript that I wrote above, this:
Forget about that rdp stuff; yesterday I ask the waitresses to setlle directly (no rdp) on the main computer, each of them using their windows user session without closing the windows session of the other - “cambiar usuario”. So change (windows) user and not close (windows) session.
That way 2 SambaPOS running for 2 users, I got the same result.
That is exactly what happens (thanks @sukasem ) and this is sukasem setup.
Update Program Setting
Is Local : False means SQL stored (QMcKay)
In case of Update, it should:
Read the setting value - in our case we give {:GLOBAL SETTING:SerialNo}
SQL update that value to database
And this is not the caseif more than 1 SamPOS program is running.
(actually the same problem occurs with only one SambaPOS running but it will not create issue)
So,
OR the value we pass is wrong - {:GLOBAL SETTING:SerialNo}
OR the Program Setting Update does not SQL store that value in the database.
OR once SambaPOS has read once from the database {:GLOBAL SETTING:SerialNo}, it is happy and works with that value in a variable. If this is the case, it would make sense (using programming vocabulary) to put Is Local = True , that way the variable that contains {:GLOBAL SETTING:SerialNo} will only be used once (local variable) by that action and the next time it execute that same action, it would have to re-read the database.
The guys who wrote that part could answer in a sec.
Before using QMcKay script to completly replace that action, I am doing a last try with that Update Program Setting action, giving the following as the Setting Value: [=TN('{REPORT SQL DETAILS:SELECT [Value] FROM [ProgramSettingValues] WHERE [Name]='SerialNumber':F.Value}') + 1]
If I still see the problem, I can discard nº1 to be the problem, so it is nº2 or nº3.
Good to know. So you are claiming that this issue is a result of running more than a single Windows User Session. Interesting. Now I have a way for me to test this without RDP. Thanks for that.
EDIT: Hmm… seems I need to learn how to run SambaPOS in multiple User Sessions… right now, one session/instance is logged in and WP is started, but in the other session/instance, the WP is closed… why are they not “aware of each-other”? I even have the Terminals set uniquely in Local Settings in each session…