DateTime field issue, updated value is not displaying

Hi Everyone,

I have two fields dropdown and datetime. Date and Time field value will be updating when drop down value is changing and user can update the date and time value if require. This works fine. 

But if you remove either date or time value then change the value in drop down then updated value is not displaying in the field but value in the variable is updated. This issue comes only when user removes one of the value in the date-time field. 

Please let me know if u could find any solutions for this.

Code is as follows,

load(
local!dropDownValue,
local!dateAndTimeValue,
{
a!dropdownField(
choiceLabels: {
"Normal",
"Urgent",
"Medium"
},
choiceValues: {
"Normal",
"Urgent",
"Medium"
},
value: local!dropDownValue,
saveInto: {
local!dropDownValue,
if(
rule!APN_isBlank(
local!dropDownValue
),
a!save(
local!dateAndTimeValue,
null
),
if(
local!dropDownValue = "Normal",
a!save(
local!dateAndTimeValue,
now() + 30
),
{
a!save(
local!dateAndTimeValue,
now() + 10
)
}
)
)
},
placeholderLabel: "--Select--",
label: "Dropdown"
),
a!dateTimeField(
label: "Date Time",
value: local!dateAndTimeValue,
saveInto: local!dateAndTimeValue
),
a!textField(
label: "saved date value",
value: local!dateAndTimeValue
),

}
)

Thanks,

Bhargavi P.

  Discussion posts and replies are publicly visible