This topic is locked

Save and (do action) button

4/27/2016 11:37:17 PM
PHPRunner General questions
W
wfcentral author

I am using phprunner 8.1 build 25268.
I would like to add a second save button on the edit page that will make additional changes to the record after record updated.
I tried some other examples in the forum, but had no luck.
table: documents

fields to change: job_done
So, if they press the normal button it just saves their changes with no additional events happening.
If they press the "Save and Complete Job" button it would save the record and also update an additional field called "job_done" and set the value to 1.
I'm making this a bit simple for the purpose of explaining it - in reality the button would update 6 different items in that record, but I figure if someone can show me how to update ONE field I can modify it to do what I need.

L
laonian 4/28/2016

I have a workaround suggestion.
Add another field in your record, e.g. "", and make this field a tiny integer. Change the "View as" to checkbox.
You can then add an event to AfterAdd/AfterEdit for this table.

if ($Values["Save_and_Complete_Job"]==1)



{

//update your six other fields
}