On new form - when I change the Due field value - the Days initial value changes as per the expression
ifs([Due]="Same day",[_THIS]=1,
[Due]="Next day",[_THIS]=2,
[Due]="Custom",[_THIS]=3)
On Edit form - the Days initial value is pre filled and now if I change the Due - the Days is not changing
how do I solve this ??
Just FYI: it's not necessary for the "[this]=" part, you can just drop the value you want into those portions of your formula.
ifs(
[Due]="Same day", 1,
[Due]="Next day", 2,
[Due]="Custom", 3
)
But I'd actually make use of SWITCH() for this:
Switch([Due],
"Same day", 1,
"Next day", 2,
"Custom", 3,
"")
----------------------------------------------------------------------------
In order to preserve the "editablility" of that field - meaning, a user can override the value in the field - you'll need to make use of the "Reset on edit" formula space.
[Day] <> lookup([_ThisRow], Table, TableID, Day)
This will check the previous version of the Day value - and if it's not what was originally there, then this field will update itself.
-------------------------------------------------------
Another option is to move the formula from the initial value to the app formula
- but this means the formula will NOT be editable by the user, it's strictly tied to that enum column at that point.
User | Count |
---|---|
15 | |
11 | |
11 | |
8 | |
3 |