I want to create a status change on a record in the database when multiple column values of that record are not empty.
On the page you can fill in the title, description and an image. The title and description are autobinded and the image is added by an workflow/action. Default the record is in “draft”, when the user fills in those three then the status needs to be set to “completed”. I don’t know in which order they fill in the values or how much time (days) there is between they fill in the values. So i thought a database trigger will do the trick.
I set a database trigger with the only when value “card-now’s title is not empty and card-now’s description is not empty and card-now’s image is not empty” and then an action that set the status to “completed”. This doesn’t work and the trigger is not fired.
Only when i set one of the three in the only when like “card-now’s title is not empty” then it fires the trigger when i fill in the title but the others also needed to be filled.
What is the right solution for this.
There are multiple ways to do this. My first thought was to just check it when they change each value. Instead of doing autobinding, change the value by right clicking and start/edit workflow. Then you can do more than just one action when that value is changed. Add another step that has a condition on it and change the value to ‘completed’ if all of those fields are not empty.
Does that help?
Thanks for your reply, i will try this. i guess this is the way to do it, but i was hoping that i could use auto binding because it is the safest way to store data and it skips an extra workflow. And the database trigger is always working no matter from where i change the title, description or image.
But i think it’s weird that the trigger is not working. Maybe it only can have the value that you change as an item in the condition and is it not possible to compare other column values in the condition that are not the one that is changed.
Hope that helps. I can see how autobinding would save a step. The trigger might be using up WU’s when you don’t need it to though. Might be better this way for WUs. Let me know how it goes.