I can't believe this is so hard.
I want to total a number of income sources based on a Microsoft Form submission. I tried first creating a JSON object with all the variables in it. Couldn't get them to add. After spending half a day on it I started working on a longer method.
Initialize intSalary as integer
Initialize intIA as integer
Initialize intPension... as integer etc.
I then tried to compose add(variables('intSalary'),add(variables('intIA'),variables('intPension'))) and that fails.
I then tried Set Variable for intSalary, using int(item()?['intSalary']) so I can see if setting them is needed. (It shouldn't be, because I've set the values upon declaration).
From the hints I've seen in the errors the initial problem is that the submitted form fields are being seen as strings, even though they are integers. As such, when I try to declare the variable using that value it fails because it expects an integer and not a string. I tried to figure out how to convert it to an integer - using the method above that I used when describing Set Variable.