Math functions for more Label fields
-
- Posts: 12
- Joined: Wed May 08, 2024 6:36 am
- Company: Streamline Irrigation
- City / Town: Kingsburg
Math functions for more Label fields
I would like to see the rounding and math functions available for more label fields.
You do not have the required permissions to view the files attached to this post.
- jovivier
- Site Admin
- Posts: 879
- Joined: Thu Mar 12, 2009 2:57 pm
- Company: Lincoln Agritech Ltd, IRRICAD Software
- City / Town: Lincoln
- Location: Canterbury, New Zealand
- Contact:
Re: Math functions for more Label fields
Hi Nick,
The rounding works with most keywords, is there one you have found where is doesn't work? You can have any rounding that you want, e.g., 0.00001.
It appears to work for me ACTFLOW.
What additional specific math are you requiring?
The current math format should work with all keywords:-
#<keyword><operator>[<number>]#
Where:
· <keyword> is an existing keyword
· <operator> depicts addition (+), subtraction (-), multiplication (*), division (/), power (^), modulus (| subtraction giving absolute result) or modulo (% remainder after division).
· <number> may be a constant number or another keyword.
I trust this helps.
The IRRICAD Team
The rounding works with most keywords, is there one you have found where is doesn't work? You can have any rounding that you want, e.g., 0.00001.
It appears to work for me ACTFLOW.
What additional specific math are you requiring?
The current math format should work with all keywords:-
#<keyword><operator>[<number>]#
Where:
· <keyword> is an existing keyword
· <operator> depicts addition (+), subtraction (-), multiplication (*), division (/), power (^), modulus (| subtraction giving absolute result) or modulo (% remainder after division).
· <number> may be a constant number or another keyword.
I trust this helps.
The IRRICAD Team
-
- Posts: 12
- Joined: Wed May 08, 2024 6:36 am
- Company: Streamline Irrigation
- City / Town: Kingsburg
Re: Math functions for more Label fields
#ACTFLOW# does work, but #NUMEMIT# does not.
I have found the emitter number is a good stand-in for tree counts, but we like to estimate to the nearest 5 to take into account the inexact nature of the plant borders and/or other things in the fields that preclude an accurate count.
I am also unable to round #NUMTREE#
There might be more, but these are the first two that I have noticed.
I have found the emitter number is a good stand-in for tree counts, but we like to estimate to the nearest 5 to take into account the inexact nature of the plant borders and/or other things in the fields that preclude an accurate count.
I am also unable to round #NUMTREE#
There might be more, but these are the first two that I have noticed.
- Dan Crosby
- Site Admin
- Posts: 174
- Joined: Thu Apr 30, 2009 9:28 am
- Company: Lincoln Agritech Ltd.
- City / Town: Lincoln
- Location: Lincoln, New Zealand
- Contact:
Re: Math functions for more Label fields
Hi Nick,
We have typically only applied rounding to real numbers. Since the values you are interested in are integers, rounding doesn't work on them directly. This is the first time we've encountered a request to round integer values - mostly people want the exact number! With that said, you can round the integers by using maths to 'convert' them to real numbers, e.g.:
#NUMEMIT#
Round down: #NUMEMIT-[#NUMEMIT%[100]#]#
Round up: #NUMEMIT+[100.5];100.0#
giving:
6235
Round down: 6200
Round up: 6300
Regards,
Dan
We have typically only applied rounding to real numbers. Since the values you are interested in are integers, rounding doesn't work on them directly. This is the first time we've encountered a request to round integer values - mostly people want the exact number! With that said, you can round the integers by using maths to 'convert' them to real numbers, e.g.:
#NUMEMIT#
Round down: #NUMEMIT-[#NUMEMIT%[100]#]#
Round up: #NUMEMIT+[100.5];100.0#
giving:
6235
Round down: 6200
Round up: 6300
Regards,
Dan
Dan Crosby
Irricad Developer
Lincoln Agritech Ltd
-
- Posts: 12
- Joined: Wed May 08, 2024 6:36 am
- Company: Streamline Irrigation
- City / Town: Kingsburg
Re: Math functions for more Label fields
Thank you. So I can add a decimal to any integer to turn it into a real (float) variable and then round that?
- Dan Crosby
- Site Admin
- Posts: 174
- Joined: Thu Apr 30, 2009 9:28 am
- Company: Lincoln Agritech Ltd.
- City / Town: Lincoln
- Location: Lincoln, New Zealand
- Contact:
Re: Math functions for more Label fields
Hi Nick,
Yes it should work for any integer value. Note that that isn't the method used by the "round down" example though. That simply subtracts the remainder of dividing the number by the specified value (100) from the original value.
Regards,
Dan
Yes it should work for any integer value. Note that that isn't the method used by the "round down" example though. That simply subtracts the remainder of dividing the number by the specified value (100) from the original value.
Regards,
Dan
Dan Crosby
Irricad Developer
Lincoln Agritech Ltd