I am trying to count records in a repeat and display the count outside of the repeat. I have one calculation and display that is working fine but I am receiving an error for the 2nd and 3rd calculations. I have attached screen grabs of the xlsx form and the error in Connect. The Esri::bind field is set to int. Any help is appreciated.
Thanks,
--gary
Solved! Go to Solution.
@GaryBowles1 In the screenshot, you attached to your original you are missing a "{" in your sum calculation.
Edit: Also in the ones above you have "(" instead of "{"
Try setting the bind:type to int.
That should work, but you can always call it a number in the calculation if it doesn't for some reason: sum(number(${countstepscomplete}))
edit:
The bind::type is set to int. I tried the sum(number($(countstepscomplete})) and sum(int($(countstepscomplete})) still not love.
thanks,
--gary
@GaryBowles1 In the screenshot, you attached to your original you are missing a "{" in your sum calculation.
Edit: Also in the ones above you have "(" instead of "{"
Can't see the forest for the trees. You stare at something that you think should work and can't find the simplest error. That solved the problem. Much appreciated.
--gary
Not exactly sure of everything you're looking for here, but the problem is likely in just the first calculation, which affects the second. Don't have time right now to look deeper into it, but it's probably where you try to convert a date to string. Dates behind the scene are stored as long numbers, either the seconds or minutes past a certain date, such as 01-01-1900. They're then (hopefully) formatted to display a certain way.
I agree that the error is probably with the original calculation which is:
if(string-length(string(${p_stependdate})) > 0, 1, 0)
From what I have been able to find in the documentation, this should grab the date, convert to string, and check if the string length is greater than 0 and return 1 for yes and 0 for no. Am I missing something in the above calc?
thanks,
--gary