When I retrieve an O365 site's list's items in the designer workflow (2013) using rest api call, the Number type columns always get set to local integer variables as zeros. I have inspected the returned JSON using the Postman and Advance REST Client tools and there are non-zero values being returned, but when I copy the values to local integer variables and try to log those local variables then all I see are zeros in the workflow history list. Has anyone else experienced this?
-
try to change the local variable type from Number to string and then check. May be some format issue.– Ankit KumarJun 3, 2016 at 6:44
-
I did that and it fails validation when checking for errors. It wont accept "Number" type even. Only "Integer" works.– AamirJun 3, 2016 at 7:30
-
U sure its a Number column which you are returning . Can you add other number columns and check if all returning same 0 value in local variable– Ankit KumarJun 3, 2016 at 8:25
1 Answer
not sure what happened, but I had to delete the "Get an item from a dictionary" action items and re-insert new ones and that fixed the problem. Buggy SP Designer wasted my two days :(
This is what the path for the dictionary item looked like in that action item: ([%Variable:index%])/MyNumricListColumn All this time I made sure that the local variable [%Variable:index%] was in fact a correct field data (judging from the way it responded to mouse clicks) and not just any plain text.
I hope this will be a lesson for others too. When in doubt, remove the action item and add it back in, no matter how correct it looks.