08-04-2014 12:49 PM
Hi All,
I'm looking for a way to reinitialize a status attribute from validated to draft when a user modifies the object (eg the comment or any other attribute of the object). Any ideas on how this can be achieved?
Solved! Go to Solution.
08-04-2014 05:03 PM
Thanks lionel,
I was indeed looking at your previous post of last year where you explained it with the rules but could not figure out how you triggered it. Today I saw the light
08-04-2014 04:30 PM
Hello Stjin,
That's right, I have used this way to trigger an event on change events too.
Sometinme it is possible to use a Knowledge Rule with a code inside that is not (only) displaying informations but is modifying attributes or links in the current object or an object linked ...
Regards,
08-04-2014 03:35 PM
I have found a way around this, here is what I did :
1. I created a new MetaAttribute format Date, attached a macro to it to have it as a calculated metaAttribute that receives the value of the Modification Date Attribute.
2.I created a MetaAttributeUpdateTool macro attached to my new date MetaAttribute where I reset the status to draft when it's validated.
Whenever a user now tries to modify the object, the modification date is updated which triggers the MetaAttributeUpdateTool because my MetaAttribute date is also updated. It checks the validation status and if it's validated it sets it back to draft.
Furthermore the same way of working seems to be possible to use to prevent users updating an object in certain conditions. If you make use of the ErrorMessage argument in the MetaAttributeUpdateTool, they seem to be unable to update the attibute.
I need to do some more testing but this seems to be the way to go. If you have any suggestions or think this might cause issues. Please let me know.
thanks
stijn