From d118b497351911cb9e5ff1daa252631b2fbabdf9 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Tue, 9 Dec 2025 10:47:09 -0500 Subject: [PATCH] Inline pctypeId logic to fix production Object required error --- api.asp | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/api.asp b/api.asp index d3fb087..01f5766 100644 --- a/api.asp +++ b/api.asp @@ -250,9 +250,31 @@ Sub UpdateCompleteAsset() machineTypeId = 33 debugMsg = debugMsg & "7-machineTypeId=" & machineTypeId & "," - ' Get PC type ID from pcType string - Dim pctypeId - pctypeId = GetPCTypeIdFromPCType(pcType) + ' Get PC type ID from pcType string (inlined to avoid function call issues) + Dim pctypeId, pcTypeClean + pcTypeClean = Trim(UCase(pcType)) + Select Case pcTypeClean + Case "ENGINEER", "ENGINEERING" + pctypeId = 2 + Case "SHOPFLOOR", "SHOP FLOOR" + pctypeId = 3 + Case "CMM" + pctypeId = 5 + Case "WAX TRACE", "WAXTRACE", "WAX", "WAX / TRACE" + pctypeId = 6 + Case "KEYENCE" + pctypeId = 7 + Case "GENSPECT", "EAS1000" + pctypeId = 8 + Case "HEAT TREAT", "HEATTTREAT", "HEATTEAT", "HEAT_TREAT", "HEATTREAT" + pctypeId = 9 + Case "PART MARKER", "PARTMARKER" + pctypeId = 10 + Case "MEASURING", "MEASURING TOOL" + pctypeId = 7 + Case Else + pctypeId = 1 + End Select debugMsg = debugMsg & "7b-pctypeId=" & pctypeId & "," ' Check if PC exists