Is there any way to reset the value to null when only the date or time is entered in a datetimefield?
Screenshots attached
1. Enter only the date in 'Fecha entrega en mano'
2. Click on CANCELAR and confirm
3. Click on EDITAR again
4. As can be seen in the screenshot, the previously entered value is displayed by default. Appian does not reset the value to null for datetimefields. However, for fields other than datetimefields, it does reset them and previously entered values do not appear.
Discussion posts and replies are publicly visible
datetime field stores the data entered in one of the fields internally, which we cannot reset. To clear it properly configure a!save(local!dateTimeValue,null) in the button that submits the form.
Additionally if cancel/submit button have any process flow that writes the data into record/data store entity, you can add and set datetime field value to null before that node as well so that if value is not proper it doesnt get saved.
When I click on ‘Edit’ and enter the date and time, or clear both fields and then click the ‘Cancel’ button, the variable value resets correctly when I edit it again. The problem arises when I enter only one of the values. It seems that, at the interface level, Appian does not reset the value correctly for that specific datetime field because the read-only field is a text field; it does display the value correctly using the same local variable, but the local variable is updated correctly.
1. I delete the time
2. Value 'Fecha acuse' after deleting the time
3. Value 'Fecha acuse' after cancel
4. Textfield in mode read only
5. Datetimefield (We are using the same input rule to display the value in both the text field and the datetime field)
Unknown said:The problem arises when I enter only one of the values. It seems that, at the interface level, Appian does not reset the value correctly
Your reading is correct, and we have zero control of this from the design side, unfortunately.