I have a date field that I want to validate so the date entered is only a Monday, how is the best way to go about this?
if ( DayOfWeek(self) = 2 ; true ; false )
It may seem counter-intuitive, but simply using "DayOfWeek ( self ) = 2" is sufficient. Equalities are boolean by nature (it either is or isn't) and resolve to true or false without the addition of an If construct.
That said, there are those (of which Mike may likely be one) who prefer the verbose approach as it makes it clearer what is going on in the calculation. I prefer the leaner approach. Both approaches work and have their merits.
Agreed. I also prefer the less verbose method, but there is rarely only one correct way to do something!
I'm usually explicit to writing things out long-handed when it comes to responding to community posts.
You don't know the level of knowledge the other user asking the question has, so I spell it out as detailed as possible.
As you noted, the shorthand version also works. It's actually even preferred in some cases (like if you're using it inside of an "IF" script step).
Or in conditional formatting or 'Hide when' or ...
Retrieving data ...