On Form edit view - Based on Enum field value the other field value is not changing

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 ??

 

Screenshot (117).png

 

0 1 40
1 REPLY 1

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.

Top Labels in this Space