Expression for "Reset on Edit"

I would like to be able to set a resetOnEdit_If expression. Similar to show_if, required_if, editable_if, etc.

This would allow the app developer to determine exactly when the column should reset, typically in conjunction with an initial value formula.

A specific case that I’m running into is that I don’t want the value to reset when the user clicks a data-change action button, but I do want the value to reset when they open the record to edit in a specific form. So I would use a context(“view”) = expression. I’m sure there are other case where it would be helpful.

You may wonder why don’t I just write a more complex expression for initial value, such as a IF statement, and specify an else expression. In my specific case again, I neither care, or know, what the original value of the column was before I’m wanting to reset it to something. I worked around this issue for now by adding a new column which saves the old value.

Kind of an edge-case I suppose, but given how similar it would be to required_if,editable_if,etc… I don’t see any reason not to include this option.

Status Open
3 9 1,130
9 Comments
GreenFlux
Gold 1
Gold 1

Voted. I agree this would be a very useful feature.

Regarding your use case:

I don’t want the value to reset when the user clicks a data-change action button, but I do want the value to reset when they open the record to edit in a specific form

In the meantime, another workaround could be using the Form’s On Submit action, with the ‘value update’ being an action that’s called when the form is saved. That won’t get triggered when the user clicks the data change action.

Aleksi
Staff

@Marc_Dillon Have you tried to add a formula with the Reset On Edit option. You can use a formula like CONTEXT(“View”)=“YourFormViewName” and it should reset the value only when you are modifing the record with that form view.

Marc_Dillon
Platinum 1
Platinum 1

@GreenFlux thanks for onSubmit suggestion, that should work. However the user would not be able to see the new value on the form, if that is important.

@Aleksi yes I did try that. The problem is that the reset occurs on any change, and clears the value. The formula only determines what the new value is, not when the reset occurs. My workaround was to save the old value in a new column, and I’m still using the context expression to determine whether to keep using old, or get a new value.

Steve
Platinum 4
Platinum 4

This already exists: the Reset on edit expression should evaluate to a Yes/No value that determines whether the Initial value expression is applied to the column value.

Steve
Platinum 4
Platinum 4

To preserve the existing value:

IF(
  some-condition,
  new-value,
  [_THIS]
)
Marc_Dillon
Platinum 1
Platinum 1

Wait, for real? Man my brain is apparently only half-working this week.

Steve
Platinum 4
Platinum 4

I gotta admit, when I red your question–seeing it was from you–I had to question my own reality: “I could swear we could already do that!”

Status changed to: Open
Pratyusha
Community Manager
Community Manager
 
dbaum
Gold 4
Gold 4

FYI, @Roderick: As noted in the comments this feature idea is already existing functionality.