Open Lendog opened 6 years ago
Will investigate.
Hi, I'm experiencing the same issue in 2.6.0 as well; sensible output in expression editor but an error when adding new features. I get the same error when not wrapping "treeid" in to_int().
(Currently I'm using aggregate() which is probably what max_value() is based off, but it requires changing the layer name every time the form is used in a new project)
Error log: Something has gone wrong. Error: ValueError: invalid literal for int() with base 10: '[% to_int(maximum(to_int("treeid")))+1 %]' Traceback (most recent call last): File "roam\mainwindow.pyc", line 449, in openForm File "roam\dataentrywidget.pyc", line 178, in load_feature_form File "roam\dataentrywidget.pyc", line 78, in add_widget File "roam\editorwidgets\featureformwidget.pyc", line 178, in setvalue File "roam\editorwidgets\featureformwidget.pyc", line 134, in bind_values File "roam\api\featureform.pyc", line 513, in bindvalues File "roam\editorwidgets umberwidget.pyc", line 105, in setvalue ValueError: invalid literal for int() with base 10: '[% maximum(to_int("treeid"))+1 %]'
the below simple value expression
crashes roam form with
In the expression string builder returns a sensible result