Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Micros 3700 - Guest Count - Macro

Status
Not open for further replies.

FreeSoldier

Technical User
Dec 10, 2013
58
US
Hi all,

Is there a way to retrieve the guests/covers count of check in a macro ?
I would like to add a touch screen button that will an order specific number of menu items depending on the number of guests/covers on a check. Is this doable with a macro in Micros 3700 ?

Thanks in advance
 
No, macros are just a preset series of actions. You'll need a SIM for this.
 
Thanks pmegan.
I know I can get the guests count with the @Gst SIM variable.
Would you happen to have an example on how to order menu items via a SIM ?

Thanks Again
 
This is completely untested, but you just need to do something like this:

Code:
[indent]
var menu_item_key : key
var menu_item_num : n5 = xxx [COLOR=#4E9A06]// change xxx to the menu item object#[/color]

[COLOR=#4E9A06]// create the menu item key[/color]
menu_item_key = key(3,menu_item_num)

[COLOR=#4E9A06]// run an ad-hoc macro with the guest count and menu item[/color]
loadkybdmacro @Gst, menu_item_key

[/indent]
 
Thanks pmegan.

I will try it in the next few days and report back.

Best
 
pmegan,

I guess I could not wait and just tried it.
I can get the "loadkybdmacro menu_item_key" to work properly and it just orders one item.
When I use "loadkybdmacro @Gst, menu_item_key" I get the following error:
"ISL error on line 18 Value Note Key Definition"

I have the feeling that @Gst needs to go through some kind of key conversion first.
Any idea?

Many Thanks
 
Found it.
Correct statement is:

loadkybdmacro makekeys(@Gst), menu_item_key

Cheers

 
Good deal. It seemed like I was missing something but I'm out of the office today and could look it up. Glad I was able to help get you close.
 
Again Thanks pmegan.

One last question. Is there a way to put menu item on hold using ISL/SIM code ?
I am looking for the equivalent of 'Function: Transaction Hold Menu Item' in the touchscreen designer.
Basically I am writing code that will order a Tasting Menu for a table. And I need to hold certain items and have the servers fire those once the table is ready to receive them.

Finally, is there also the equivalent of 'Function: Transaction Exit Condiment' in ISL/SIM code as well?

The file SIMHelp.hlp from micros is not very friendly/helpful.

Thanks

 
Try creating these key variables and see if they work with a loadkybdmacro statement:

Hold: key(1,458771)
Exit Cond: (1,458776)

I don't know how useful those will be, one thing you can't do from a SIM is select specific items on the check and take action on them, but those key definitions should work.

Here's a quick tip. If you need the key definition for a touchscreen button just open dbisql and look at the key_type and key_num fields in micros.ts_key_def. Those will usually be the values you need to recreate the key with SIM.
 
Thanks pmegan,

Exit Condiment works like a charm.
The hold function does not work since as you stated no item are highlighted to hold.
I noticed that there is a system variable @dtl_is_on_hold that will give you an array of item on hold.
Do you happen to know if there is another way to hold item on a "un-send" check ?

Best



 
There is a function key (might even be the same one) that holds all unsent items on a check. Might work for you?

Other than that, no. No other way to hold an item - you can't right to any of the @dtl variables.
 
Can't write.. sometimes I wish I could edit posts, or that I would take the time to proofread. Meh.
 
Thanks Moregelen. I noticed that you were looking for the same feature a year or so ago.

Since we can't do this via an ISL procedure/function, is there a away to this via SQL inside ISL?
I notice the chk_dtl table has an obj_item_on_hold so we should be able to flip a bit somewhere an put an menu item on hold.

Best
 
You could do that, but I'm unsure if it would actually work given that the workstations themselves actually contain a small local database that isn't kept real-time synced to the database server - you also can't edit the local database, so you can only flip the flag on the server. Given that the server handles printing though, it might actually work. Worth a try I suppose. Let us know how it goes.

If you don't know how to run a query on the database, here is an example (bearing in mind I didn't test this):

Code:
event inq : 1

	var sql_h : N12
	var sql_cmd : A2000
	var con_status : N9
	
	DLLLOAD sql_h, "MDSSysUtilsProxy.dll"
	if sql_h = 0
		exitwitherror "Failed to load DLL"
	endif

	DLLCALL_CDECL sql_h, sqlInitConnection("micros", "ODBC;UID=custom;PWD=custom", "")
	DLLCALL CDECL sql_h, sqlIsConnectionOpen(ref con_status)

	if con_status = 0
		exitwitherror "Failed to connect to database"
	endif

	format sql_cmd as "Do my query here"
	DLLCALL_CDECL sql_h, sqlExecuteQuery(sql_cmd) [COLOR=#4E9A06]//use sqlGetRecordSet if you want a returned value[/color]
	DLLCALL_CDECL sql_h, sqlGetLastErrorString(ref sql_cmd)
	
	if sql_cmd <> ""
		errormessage "An error occured executing sql_cmd"
		exitwitherror sql_cmd [COLOR=#4E9A06]//now contians error message, though it might not actually fit in the errormessage window[/color]
	endif

	DLLCALL_CDECL sql_h, sqlCloseConnection()
	DLLFREE sql_h

endevent
 
I noticed a typo already. All DLLCALL_CDECL should contain that underscore. My second call doesn't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top