Louis,
Sorry about that. My mistake. Adding the expression to the Status Expression will not work. And you have probably discovered that it is ineffective as a Post-Expression. Thus, though it adds a step to your sequence, the easiest option is to add a statement step that evaluates:
RunState.Sequence.Main["yourstep"].Result.Error.Code != 0?(RunState.SequenceFailed.Value = True):(RunState.SequenceFailed.Value = False)
You could put this step in the Cleanup step group and unselect Record Results from the Step's Properties>>Run Options.
Regards,
Eric M.