I am currently working on a Updatable BAQ Grid using application studio. I have the BAQ that allows for updating the status of a job to be closed along with the date of close and the comments. I had a user reach out concerned of constantly having to put the closed date to today. Is there a way to make the closed date the current date when changing the status of closed to True?
I currently have a button for updating the data so the user can modify it without live changes avoiding mistakes as much as possible. Also the date has to be selected after selecting the closed since whatever bpm would normally set it to today doesnt trigger when using an updatable BAQ within an application studio grid.
I was thinking possibly using a condition for the dataset to check for jobs set to closed and that those closed jobs don’t already have a date and if they don’t then set the value to the job closed date to todays date but I don’t fully understand the execution model and if the conditions should be before triggering the update event or in between the dataview check and the rest-erp action or maybe there’s somewhere that I’m un aware of.
I am trying to iterate this and this is what I have but it seems my button is working on updating the original field (JobClosed) but the date isn’t working properly for some reason.
Then I just do a grid refresh after calling the event. I was adding a dataview condition to this and then sending out to the rest erp wether or not the row has a True for closed or not but it seems to still not be updating properly.
BONUS: If you want to clear out the date whenever a user makes a job no longer closed (or maybe mis clicks and hits the wrong job to close in this list)
You will want to make another Data Rule for that as well.
Since the button I posted previously in this thread shows how that works and grabs the current dataset whenever my user hits the “update” button it will take what the GRID has and push that up and now the job will properly be updated without needing any fancy BPM wizardry and leave room for the user to make mistakes in mis clicks or adjust the date to something else then todays date if they wish!