diff --git a/src/qqq/components/scripts/ScriptTestForm.tsx b/src/qqq/components/scripts/ScriptTestForm.tsx index 887f38c..11b16da 100644 --- a/src/qqq/components/scripts/ScriptTestForm.tsx +++ b/src/qqq/components/scripts/ScriptTestForm.tsx @@ -70,6 +70,11 @@ function ScriptTestForm({scriptId, scriptDefinition, tableName, fieldName, recor const [testException, setTestException] = useState(null as string) const [firstRender, setFirstRender] = useState(true); + if(firstRender) + { + setFirstRender(false); + } + if(firstRender) { scriptDefinition.testInputFields.forEach((field: QFieldMetaData) => @@ -108,6 +113,8 @@ function ScriptTestForm({scriptId, scriptDefinition, tableName, fieldName, recor ///////////////////////////////////////////////////////////////// // associated record scripts - run this way (at least for now) // ///////////////////////////////////////////////////////////////// + inputValues.set("apiName", apiName); + inputValues.set("apiVersion", apiVersion); output = await qController.testScript(tableName, recordId, fieldName, code, inputValues); } else