Rounding up a value
Hi All
I am faifly new to WF5 and am struggling with somethng I would presume is a faily simple fix. Stick with me whilst I try to explain
I have picked up a workflow from a colleague who has gone on extended leave. Before he left he finished this workflow but on further testing its not quite doing what it should.
The purpose is to take a 3 figure map grid reference and plot the location on a map. So it takes an input of a map number queries against a map grid feature layer to get the minx and miny.
Then for the Y value, for exmaple, we need to get the first 2 digits, append the grid value entered by the user and add "00" to the end. eg Map Griod reference WC4 489 264 equates to coordintates 748900, 6526500.
In principle this works well, except in the case with large map sheets where the Y Coordinate spans between 6499999 and 65+. Because, in a majority of the cases most of the mapsheet is in the 65 range, but in the set property value calc below all we seem to do is get the first two digits..what I need to do is ROUND UP when getting this value so 6499999 would become 65...In he expample above we are currently returning 748900, 6426500.
=(parseInt($geometryExtent1.extent.ymin/100000)).toString() + $formMapGridRef.state.Yvalue.value + "00"
I just cant get the syntax right to round up the yvalue, and would appreciate any thoughts or assistance.
-
you could try Math.ceil
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
1 kommentar