Hello,
I created a template and workflow with the goal of automatically sending an email alert when a form is saved. The only issue I’m running into is the establishing the query in my workflow.
I have my function with the configuration type “Compose records search”
module* (Handle) ChangeManagement
namespace* (Handle) IT
query (String) "ProposedChanges = " + record.recordID
The error code is -
“Test failed: workflow 362762814265229314 step 20 execution failed: expression “"ProposedChanges = " + record.recordID” failed: invalid operation (string) + ()”
What should my string look like?
It’s been sending all the records ever created instead of the one that was just created and saved - which is the goal.
your string should look like this
“ProposedChanges ==” + record.recordID
1 Like
Thank you so much for your response. I tried using the string you provided, and I received the error message “Test failed: workflow 362762814265229314 step 20 execution failed: expression ““ProposedChanges ==” + record.recordID” failed: invalid operation (string) + ()”
Any recommendations?
if the purpose is to lookup for the last created record u can just use the function type “compose record lookup (last created)”
for the query issue what type is the “proposedChanges” field or what kind of data do you store inside it ?
Thank you for your response! Please see response above.
in the second picture the function compose record lookup(last created)
only outputs a single ComposeRecord
but then in the third picture u defined renderVariables.lineItems
to be an array where it should be a ComposeRecord
since lineItems is a single record
after you make the changes, the right synthax to use in your case inside the template is {{.lineItems.values.field_handle
}}