{
	"name": "form/manager/document/query_init.json",
	"info": "code uses this: form/manager/document/documet_type_permission.json",
	"rec": "form/manager/document/rec.json",
	"data_query_future": [
		{"run": [["parameter.link1", "=", ["map", ["documentLink1", "data.work_order_so.data", "ord.record_id", "so_"]]]]},
		{
			"tag": "work_order_so_wo",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		},
		{"run": [["parameter.link1", "=", ["map", ["documentLink1", "data.work_order_so.data", "co.record_id", "co_"]]]]},
		{
			"tag": "work_order_so_wo",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		},

		{"run": [["parameter.link1", "=", ["concat", ["'sor_", "parameter.sales_order_row", "'"]]]]},
		{
			"tag": "reclamation_wo",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		},

		{"tag": "reclamation_so", "query": "query/af/document/document_query_reclamation_so.json"},
		{
			"run": [["parameter.link1", "=", ["map", ["documentLink1", "data.reclamation_so.data", "rcl.record_id", "rcl_"]]]]
		},
		{
			"tag": "reclamation_so",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		},

		{"tag": "work_order_so", "query": "query/af/document/document_query_work_order_so.json"},
		{"run": [["parameter.link1", "=", ["map", ["documentLink1", "data.work_order_so.data", "pro.record_id", "wo_"]]]]},
		{
			"tag": "work_order_so",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		},
		{"run": [["parameter.link1", "=", ["map", ["documentLink1", "data.work_order_so.data", "pr.record_id", "w_"]]]]},
		{
			"tag": "work_so",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		},

		{"run": [["parameter.link1", "=", ["map", ["documentLink1", "data.work_order_qry.data", "pr.record_id", "w_"]]]]},
		{
			"tag": "work_wo",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		}
	],
	"data_query": [
		{"tag": "sales_order_row_qry", "query": "query/af/document/document_query_sales_order_row.json"},
		{
			"run": [
				["parameter.product2", "=", ["reduce", ["arrayFirstKey", "data.sales_order_row_qry.data", "pr.product_id", ""]]]
			]
		},
		{"run": [["if", ["parameter.product2", "<>", ""], [["parameter.product", "=", "parameter.product2"]]]]},
		{
			"run": [
				["parameter.link1", "=", ["map", ["documentLink1", "data.sales_order_row_qry.data", "ordr.record_id", "sor_"]]]
			]
		},
		{
			"tag": "sales_order_row",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		},
		{
			"run": [
				["parameter.link1", "=", ["map", ["documentLink1", "data.sales_order_row_qry.data", "ord.record_id", "so_"]]]
			]
		},
		{
			"tag": "sales_order",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		},
		{
			"run": [
				["parameter.link1", "=", ["map", ["documentLink1", "data.sales_order_row_qry.data", "co.record_id", "co_"]]]
			]
		},
		{
			"tag": "company_so",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		},

		{"tag": "sales_order_qry", "query": "query/af/document/document_query_sales_order.json"},
		{
			"run": [["parameter.link1", "=", ["map", ["documentLink1", "data.sales_order_qry.data", "ord.record_id", "so_"]]]]
		},
		{
			"tag": "sales_order2",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		},
		{"run": [["parameter.link1", "=", ["map", ["documentLink1", "data.sales_order_qry.data", "co.record_id", "co_"]]]]},
		{
			"tag": "company_so2",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		},

		{"tag": "product_name_qry", "query": "query/manager/product/product/product/product_id.json"},
		{
			"run": [["parameter.link1", "=", ["map", ["documentLink1", "data.product_name_qry.data", "co.record_id", "co_"]]]]
		},
		{
			"tag": "company_pr",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		},
		{"run": [["parameter.link1", "=", ["map", ["documentLink1", "data.product_name_qry.data", "pr.record_id", "w_"]]]]},
		{
			"tag": "work_pr",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		},

		{"tag": "work_order_qry", "query": "query/af/document/document_query_work_order.json"},
		{"run": [["parameter.link1", "=", ["map", ["documentLink1", "data.work_order_qry.data", "pro.record_id", "wo_"]]]]},
		{
			"tag": "work_order",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		},
		{"run": [["parameter.link1", "=", ["map", ["documentLink1", "data.work_order_qry.data", "ord.record_id", "so_"]]]]},
		{
			"tag": "sales_order_wo",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		},
		{"run": [["parameter.link1", "=", ["map", ["documentLink1", "data.work_order_qry.data", "co.record_id", "co_"]]]]},
		{
			"tag": "company_wo",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		},
		{"tag": "reclamation_wo_qry", "query": "query/af/document/document_query_reclamation_wo.json"},
		{
			"run": [
				["parameter.link1", "=", ["map", ["documentLink1", "data.reclamation_wo_qry.data", "rcl.record_id", "rcl_"]]]
			]
		},
		{
			"tag": "reclamation_wo",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		},

		{"run": [["parameter.link1", "=", ["map", ["documentLink1", "data.product_name_qry.data", "pr.record_id", "pr_"]]]]}
	],
	"grid": [
		{
			"name": "document",
			"query": "query/af/document/document_query_link1.json",
			"columns": "grid/af/document/document_column.json"
		}
	]
}
