Date Validation in PDM
Date Validation in PDM
Before I go to the trouble of writing an add-in, I just want to check that I'm not missing something. I have a data card with a 'Need Date' field on it. I need to verify that the need date is not in the past before allowing a transition to take place. I don't see a way to do this out of the box.
Re: Date Validation in PDM
We had a completely different scenario, but it could be useful maybe. I am not in front of my pc so I am speculating.
I am not daily working on this kind of stuff, so you are probably more aware than me on what the PDM tools are able to achieve.
If the date is a problem.
My colleague used the data card logic to enable a label in the datacard itself showing the date in a certain field was more than xx months older than the current date.
Instead of the label i would change the value of a hidden flag (0,1) somewhere in the datacard and check its value during transition.
If the check before transition is a problem.
An automatic dispatch triggered by file type and transition name, checks the date or the flag above before the transition happens and forcefully quit the operation.
I am not daily working on this kind of stuff, so you are probably more aware than me on what the PDM tools are able to achieve.
If the date is a problem.
My colleague used the data card logic to enable a label in the datacard itself showing the date in a certain field was more than xx months older than the current date.
Instead of the label i would change the value of a hidden flag (0,1) somewhere in the datacard and check its value during transition.
If the check before transition is a problem.
An automatic dispatch triggered by file type and transition name, checks the date or the flag above before the transition happens and forcefully quit the operation.
Re: Date Validation in PDM
IIRC the boiler plate answer to data card validation was to put a check in the transition conditions. Which, IMO, is like putting a "Wrong Way" sign three blocks down a one lane street. I was just looking at transition condition and I didn't see a way to select a live comparator such as "today", only hard dates.