I created an integer field with a calculation to display the highest number from 4 other integer fields. So for field ${highest_number}, the calculation is max(${field1}, ${field2}, ${field3}, ${field4}). Using these numbers as an example: 450, 290, 875, and 1285; 875 is returned as the max number because I assume it starts with the highest number but obviously 1285 is the highest number. Any ideas on what is going on?
Solved! Go to Solution.
It seems to be parsing fields 1 - 4 as text instead of numbers. I would try forcing them to be read as integers using int(): max(int(${field1}), int(${field2}), int(${field3}), int(${field4})).
It seems to be parsing fields 1 - 4 as text instead of numbers. I would try forcing them to be read as integers using int(): max(int(${field1}), int(${field2}), int(${field3}), int(${field4})).
That did it! Thank you so much. I assumed it had something to do with that but wasn't sure the fix.
Glad that worked! That happens to me all the time. Some fields that I expect to be numerical are processed as text instead, especially if I am using a select one with numerical values.
You can also use the bind::type column set to int on the fields you want to check.