Default Value based on Calculation Field

Hi ,

is it possible to a Integer Field set as default value a previous
calculated field

type name label
default

calculate selectedtypea TypeA integer typeb CatB
int($(selectedtypea))

if i use an integer as a default value works fine, but when i use a
previous calculated field then pass the conversion to XLSForm but nothing
displays in Collect...

Thanks
Panos

You cant specify a calculation in a default, only a literal value. But you can accomplish the equivalent by adding an additional control for your result to display which takes the user's input value if there is one, otherwise it equals the result of your calculation if no value has been entered yet. Try this:

calc_default.xls (5.5 KB)

1 Like