Hi all,
I have a Q&A form where the user submits a question. Default status is "Submitted". The site admins come to the new question and answer it. They change the status to "Completed" and I would like the "Date Completed" field to be populated with the current date. I had it working, but every time the form was opened, the Date Completed changed to the current date. It needs to not change again once the status has been set to Completed. I've tried ensuring that the function only runs when the Date Completed field IsBlank, but no luck. Not sure if I'm pointing to the wrong element or what. And of course, now that I've changed it, I forgot to record what worked partially and have not been able to get it back to even that point.
Right now, I have the function set to run in the Status field's "On Change", so that when the status is changed, it will check the status value and whether the DateCompleted field is blank. If all conditions are met, it should set the variable "answeredDate" to Now().
Status On Change:
If(Self.Selected.Value = "Completed" & IsBlank(ThisItem.DateCompleted), Set(answeredDate, Now()))
[I've tried IsBlank(DataCardValue11.SelectedDate) as well with no better results]
DateCompleted date picker Default:
answeredDate
DateCompleted On Change (if the admin needs to change the Date Completed value manually, this should set the variable to the new date and then the default gets updated with the new value in the answeredDate variable, right?):
Set(answeredDate, Self.SelectedDate)
I would have thought something like this would be simple. I've been able to do it with other field types, but not with date.
Again, I'm trying to make Date Completed set to the current date when the status = Completed, and NOT change again the next time the form is opened.