queue.getEntryLinks() Binding to Dropdown Menu

Sepasoft MES Module Suite

Binding EBR Viewer to a Dropdown Menu

Warning

Scripting function queue.getEntryLinks() is available in versions:

3.81.5 SP5 Stable and later

3.81.6 RC2 Release Candidate and later

This script bound to a dropdown menu provides the ability to select a batch for EBR on a Perspective View during runtime.

Python
def transform(self, value, quality, timestamp):
	"""
	Transform the incoming value and return a result.

	Arguments:
		self: A reference to the component this binding is configured on.
		value: The incoming value from the binding or the previous transform.
		quality: The quality code of the incoming value.
		timestamp: The timestamp of the incoming value as a java.util.Date
	"""
	list = system.mes.batch.queue.getEntryLinks(1, 20, None)
	finalList = []
	for i in range(len(list)):
		#finalList.append({'value':list[i],'label':list[i]})
		batchID = list[i].getMESObject().getBatchID()
		finalList.append({'value':batchID,'label':batchID})
	return finalList

Sepasoft MES Module Suite