Reset_if expressions

Been a while since I build an app and I am a bit rusty and I was hoping if someone can help me with is probably a issue solution to a Reset_if scenario I am looking for.

I have two specific columns of a table that includes a few others.

  1. Status
  2. Status Date

Status date is currently empty, however status is mostly populated as well as the data in most of the other columns in the table.
I would like that Status Date to Reset_if I change or edit the data in the Status column.

Note:

  1. The status date wonโ€™t necessarily be todayโ€™s date. So timestamp will not help.
  2. I also would like to make the Status Date required only if the Status is changed / editted.

Can anyone help?

0 7 964
7 REPLIES 7

Hi there,

Did you tried to set the โ€œReset on Editoโ€ mode to be turned on?

I m not testing with actual app, but hope it will work.

  1. Turn On Reset On Edit
  2. Push Expression into it, something like [_thisrow_before].[Status]<>[_thisrow_after].[Status]
  3. Set the initial value to TODAY() for Status Date column

Once the user access to any row for edit and change the status, from A to B or even null to A, it detect change and trigger constrains and reset the value for Status Date to Today()

Also set the required if constrain with expression [_thisrow_before].[Status]<>[_thisrow_after].[Status]

Thanks

Will test it out and let you know.
Does your suggestion work if I keep status date initial value blank?
The status date actually is on another system so it is rarely is todayโ€™s date when the status changes.

I remember if you leave the initial value to blank, i.e. null, then it is possible [_thisrow_before].[Status]<>[_thisrow_after].[Status] will be triggered all the time, but im not perfectly sure unless I do hands on test. Let me know how it works or NOT works.

Steve
Platinum 4
Platinum 4

I have noticed the below option for the Change column types. Do you believe there is better way to rather use change type together with the below option for my specific scenario. If so, could elaborate how to use them in my scenario?

2X_f_fcbb9e63f58049f6477ff9d45120b59846fe8881.png

AssignmentLOG : CycleCOUNT

type: ChangeCounter

jdtylerdev_0-1689817461132.png

Reset_If expression for column CompleteSRVC? (Yes/No)

 

AND([_THISROW_BEFORE].[Status]="Pending",[_THISROW_AFTER].[Status]="Assigned",[CycleCOUNT]>=2)

 

Resets the complete services? column that is set when a technician bills out services but anticipates a second technician be added to the assignment and doesnt want to close out the entire ticket.

This  allows for:

  • the services and JobID to be reset 
  • a second technician to be added to a ticket
  • not double bill for services
  • initiates the loop around for the status workflow until work is complete and ticket is finalized.

@Michael_Pinto
For [Status Date] leave the initial value blank or set it to TODAY()
For the Required_if and Reset_if, you can use below expression:

NOT(
	[Status]=LOOKUP(
				[_THISROW].[KeyColumn],
				"Tablename",
				"KeyColumn",
				"Status"
			)
)
Top Labels in this Space