question

Lydia Freitas avatar image
0 Likes"
Lydia Freitas asked Matt Long edited

I would like to link my dashboard button with the "perform batching" of a queue. There is some code for it?

I tried this code, but it did not work: setchecked(getvarnode(node("Estoque Inicial 1", model()), "usebatching"),0);

Choose One
queueflexscriptcode editordashboard bottonperform batching
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Brandon Peterson avatar image
3 Likes"
Brandon Peterson answered

Lydia,

Here is a sample model that should do what you are attempting. I created a model with a single queue and then made a checkbox in the dashboard that toggles the batching process in the queue. To make the checkbox functional you need to untoggle the "edit mode" on the dashboard. In "edit mode" clicking on the check box will attempt to edit it instead of toggle it. I pointed the link for the check box to the "usebatching" variable of the queue.

I hope this helps,

Brandon


5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Matt Long avatar image
3 Likes"
Matt Long answered Matt Long edited

Brandon's answer is the best as it uses a Dashboard Widget to modify the batching. However, if you did need to set the batching using code rather than the Dashboard the code would be:

setvarnum(node("Estoque Inicial 1", model()), "usebatching", 0)

The setchecked() command is specifically used for checking a GUI check box.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.