Hi there,
Yep, it's possible.
It'll all be conditions, or if(), depending on what you're more comfortable with.
For a condition, you can just check "is status equal to est?" if no, then you set your variable as Revision1. If yes, then another condition to check MgmtId. Is MgmtID not empty? If yes, then Revision 2. If no, then Revision 3. It sounds like from there, you want to +1 for each time it's updated (really? Every time it's updated? Or every time there is a specific change / major version?) .. is that correct?