Update function in workflow does not work

Hi,
I developed an app and in that app I insert and update rows in a Google spreadsheet. No problem!
Now I’m creating a workflow and in that workflow I want to update a few fields in that spreadsheet. Therefore I created a function in that workflow with a few input parameters.
When I enter the update values (shown in the image below) I see that there is an error message “The value has to be of type 'object | void', you provided a value of type 'string'”. The values after the “: “ are input parameters of the function.
When I try to test the function I get this error “The value has to be of type 'object | void', you provided a value of type 'string'”.
I used a similar update as in the app that I mentioned and I don’t understand why this does not work in this workflow, although in the app the values after the “: “ were enclosed by double braces {{}}.


When I try to enclose the values with the braces I don’t get the error about the object type, but the update is not executed. I also see that the values are empty (in the red squares) although the function has valid input parameters.
wf3

Any idea what is wrong here?
Are there limitations in a workflow?
I hope someone can help me.

kind regards
Reyer

I finally found the solution.
The values have to be enclosed with braces:
wf1

and the filter value has to be enclosed by braces too.
wf2.

What has confused me is that the color red in the first image and the error message in the second image give me the impression that it cannot work.
But it does!
Contract_ID is an input parameter of this function so why is it "not defined"?

So despite the confusion it works.

Reyer

Hi @Reyer_Sneller! You mention these are input values—are these additionalScope values by any chance?

https://community.retool.com/t/how-to-use-additional-scope-additionalscope-in-your-queries/13343

If so, the double curlies are definitely required so the query knows the difference between the string of "Action" and the additionalScope value that you named Action.

Additionally, if you are indeed using additionalScope to insert values into the placeholders in your Google Sheets query, it's actually correct that the values show up as undefined/red. This is because the values don't get defined until they're populated via the additionalScope!

If you're not using additionalScope, let me know how these values are currently being filled!

Hi Victoria,
I'm not using additionalScope.
But using the double curlies solved my problem.
Thanks
Reyer

Awesome—very glad to hear that. Thank you for the udpate!