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