Q&A "Currency" datafields keep their previous Q&A value if the field value is set to "nothing" instead of cleared using "X"

Q&A ID: #1021742

Hello!

I have run across a bug with currency-type datafields in Q&A.

I have a currency-type field, where there is a default yellow placeholder of 20,000 EUR if no value is entered:

If a value is entered, the placeholder highlight is removed:

However, if the value in the field is then deleted, the previous entry still stays in the document and export. Notice the “X” cross indicating that the question has been responded to and not cleared:

I can imagine some end-users adding an amount, then deciding they do not know the correct sum (or entered the amount into the wrong field), and deleting it instead of pressing “X”. In this situation where the field value is empty, I want to revert to my yellow placeholder, to signal that there is missing information.

For my safety placeholder, I am using:

@if(#financing-round^deduct-dd-amount, #financing-round^deduct-dd-amount, @placeholder(“EUR 20,000.00”))

What is weird to me is that this behaviour works as I want it to for text type datafields.

I have a similar setup for entering a party name (XXX in the example below):

Deleting the value but leaving the field as “not empty”, will revert back to the “empty placeholder”, even if the field has not been cleared using “X”:

To me, it seems that the “Currency” datatype counts as “filled” even if the value is “nothing”, whilst for text datatypes, it counts as “not filled” if the value is “nothing”. Could this lead to the above @if-function behaving differently?

Best
Kai

If I set the currency-question to “mandatory”, meaning the value can no longer be cleared using “X”, it becomes impossible to revert to the placeholder.

Interestingly enough, setting the amount to “0”, does toggle the second @if option - so for currency, 0 means “no entry”, whilst “leaving-it-blank-after-entering-a-value” means “previous entry with a number value”

Does that mean the currency number is just not updated if it is not replaced with a new value that is a number?

For now, I have fixed this by making the answer both “mandatory” and “no free answers”, with a default of 0.

Thanks again!
Kai