Workflow - query (String)

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?




image

It’s been sending all the records ever created instead of the one that was just created and saved - which is the goal.
image

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 ?

The “ProposedChanges” is a text box within the form. We were trying to establish a connection between the record and the recordID. The compose record lookup (last created) makes perfect sense and we gave it a try and while the workflow functions correctly, the data is not being transmitted in the email. I will include some photos for reference.


Screenshot 2023-11-17 082500
Screenshot 2023-11-17 082509
Screenshot 2023-11-17 082518
Screenshot 2023-11-17 082531

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}}