January 2, 201313 yr Hi, I have a client where his calendar year starts April 2013. Not January 2013. So I built a script step in my Start Up script that SETs the Preference Field "Pref Begin Yr" to the current year only if ... If [ Month ( Get ( CurrentDate ) ≥ Preferences::Pref Begin Month and Year ( Get ( CurrentDate ) ) ≠ Preferences::Pref Begin Yr ) ] Set Field [ Preferences::Pref Begin Yr; Year ( Get ( CurrentDate ) ) ] End If This is how i read this script step: 1 ( current month ) ≥ 4 ( preference month ) and 2013 ( current year ) ≠ 2012 ( preference year ) The set field should not SET, but is does How can this expression be valid when 1 is obviously less than 4. Maybe I don't really understand the "AND". Do I put: Year ( Get ( CurrentDate ) ) ≠ Preferences::Pref Begin Yr ) in parentheses " ( .... )" ?? Any guidance here would be grateful. Thank you. Tom
January 2, 201313 yr At first glance, it looks like you have misplaced parentheses. Move the last ) to just after the first Get(CurrentDate), to get: [ Month ( Get ( CurrentDate ) ) ≥ Preferences::Pref Begin Month and Year ( Get ( CurrentDate ) ) ≠ Preferences::Pref Begin Yr ]
January 2, 201313 yr Author Yeah ... boy what a dope, I looked at that thing for three hours. I see it! Thank you :-)
Create an account or sign in to comment