diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte
index 8a9d1e59ea..677ee79981 100644
--- a/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte
+++ b/packages/builder/src/components/automation/SetupPanel/AutomationBlockSetup.svelte
@@ -58,6 +58,7 @@
AutomationEventType,
AutomationStepType,
AutomationActionStepId,
+ AutomationCustomIOType,
} from "@budibase/types"
import { FIELDS } from "constants/backend"
import PropField from "./PropField.svelte"
@@ -394,7 +395,9 @@
*/
const onRowTriggerUpdate = async update => {
if (
- ["tableId", "filters", "meta"].some(key => Object.hasOwn(update, key))
+ ["tableId", AutomationCustomIOType.FILTERS, "meta"].some(key =>
+ Object.hasOwn(update, key)
+ )
) {
try {
let updatedAutomation
@@ -744,7 +747,11 @@
for (let [key, field] of properties) {
// need to look for the builder definition (keyed separately, see saveFilters)
const defKey = `${key}-def`
- if (field.customType === "filters" && inputs?.[defKey]) {
+ if (
+ (field.customType === AutomationCustomIOType.FILTERS ||
+ field.customType === AutomationCustomIOType.TRIGGER_FILTER) &&
+ inputs?.[defKey]
+ ) {
filters = inputs[defKey]
break
}
@@ -846,7 +853,7 @@
- {#if value.customType === "trigger_filter"}
+ {#if value.customType === AutomationCustomIOType.TRIGGER_FILTER}
@@ -977,7 +984,7 @@
{/if}
- {:else if value.customType === "filters" || value.customType === "trigger_filter"}
+ {:else if value.customType === AutomationCustomIOType.FILTERS || value.customType === AutomationCustomIOType.TRIGGER_FILTER}
{filters.length > 0
? "Update Filter"
diff --git a/packages/server/src/automations/triggerInfo/rowSaved.ts b/packages/server/src/automations/triggerInfo/rowSaved.ts
index a178e2c7e8..d128934dcc 100644
--- a/packages/server/src/automations/triggerInfo/rowSaved.ts
+++ b/packages/server/src/automations/triggerInfo/rowSaved.ts
@@ -25,7 +25,7 @@ export const definition: AutomationTriggerSchema = {
},
filters: {
type: AutomationIOType.OBJECT,
- customType: AutomationCustomIOType.FILTERS,
+ customType: AutomationCustomIOType.TRIGGER_FILTER,
title: "Filtering",
},
},