Hi all, I want to do some fairly complex actions when my users create a new record, and in certain circumstances block them from creating it.
Here is the logic that I want to run when I create a new record:
-
If FieldA is not null
-
Look for a record with matching FieldA
-
If such a record is found, do not add this record, stop
-
Else:
-
If FieldB is null
-
Fetch BValue from external source with a script that takes FieldA as input
-
-
-
-
If FieldB is now not null:
-
Look for an already existing record with a FieldB value that matches what I found
-
If such a record is found, do not add this record, stop
-
Else, update this record with the new FieldB value
-
-
The first issue is that I have nesting “IF”s here. And I cannot seem to nest IF statements in the automation interface. Is there a way to implement nested-IF logic in an automation other than by creating a custom script?
The second issue is how to delete the triggering record. Is there a way to do that in an automation, other than by creating a custom script that calls deleteRecordAsync ?