{
	"name": "query/manager/product/production_order/mainlevel.json",
	"info": "---- ?? tarkoittaa epäselvää",
	"table": [
		{
			"record_type": [""],
			"table": "production_order"
		}
	],
	"query": [
		["_fo_SEL_USE", ["Into_current_selection", ""]],
		["wo_OPEN_QRY", ["true"]],
		["_txt", "=", [["_fld_Name4DLong", ["pro.production_lot"]], "+", "=", "+", ["_fld_Name4DLong", ["pro.json_data.parent_production_lot"]]]],
		["_long", "=", ["_qry_Formula", ["wo_tbl", "_txt", "true"]]],
		["_set_CREATE", ["wo_tbl", "wo_MainLevelQuerySet1"]],
		["_fo_SEL_USE", ["Into_current_selection", ""]],
		["_txt", "=", ""],
		["_qry_Fld", ["0", ["pro.json_data.parent_production_lot", "=", "_txt"], "", "true"]],
		["set_CREATE", ["wo_tbl", "wo_MainLevelQuerySet2"]],
		["_set_UNION", ["wo_tbl", "wo_MainLevelQuerySet1", "wo_MainLevelQuerySet2", "wo_MainLevelQuerySet1"]],
		["_set_USE", ["wo_tbl", "wo_MainLevelQuerySet1"]],
		["_set_CLEAR", ["wo_tbl", "wo_MainLevelQuerySet1"]],
		["_set_CLEAR", ["wo_tbl", "wo_MainLevelQuerySet2"]]
	]
}