The following deletion rule for the ProgressLabel object does not work as shown:
If ProgressLabel.StageNumber<>MAX ProgressLabel.StageNumber Then
REPORT ERROR 'Can`t delete intermediate ProgressLabel. Only the last one can be deleted.' + ProgressLabel.StageNumber + ':' + MAX ProgressLabel.StageNumber + ':'
I also does not work if I add or subtract 1 from the right side of the inequality (just in case!).
Trying to use the REPORT ERROR function to report actual values reveals that ProgressLabel.StageNumber is properly reported, but MAX ProgressLabel.StageNumber is output as an empty string.
The code now works but trying to use the REPORT ERROR function to report actual values reveals that ProgressLabel.StageNumber is properly reported, but MAX ProgressLabel.StageNumber is still output as an empty string.