Hello there,
In the save button, I'm using 4 Patch functions, 2 for new and updated actions in data source, and rest 2 for new and updated actions in collection. I have to repeat the codes 4 times. With this code, I can create new or update record successfully.

Now, I try to reduce the code, to set the updated data into a variable, then replace the code with variable. But I got following error:

Below is the variable data.

Any idea to improved is appreciated. Thanks.
Max