KirkR Posted March 31, 2008 Posted March 31, 2008 (edited) The problem is you cannot reference non-global fields from an unrelated table. I want to calculate, whenever used, the current day of the year. Every reference number in my system uses the last 2 digits of the year, plus the day of the year "dash" serial ID. My calc field for 3 digit days of year..... Right ( Year ( Get(CurrentDate) ) ; 2 ) & Globals::DayOfYearCalc &"-" & ( RightValues ( SalesOrders::SO_ID ; 3 )) The DayOfYearCalc is ... If (DayOfYear (Get(CurrentDate)) < 100; 0 & DayOfYear (Get(CurrentDate)); DayOfYear (Get(CurrentDate))) The global DayOfYearCalc calculation field does not calculate if it is set as a global (Dataviewer shows the field as blank, unless I change it to unstored). If it is set as unstored, it cannot be referenced, as an unrelated table. I have taken to putting this calculation into every table occurrence, but it seems grossly redundant. Edited March 31, 2008 by Guest
mr_vodka Posted March 31, 2008 Posted March 31, 2008 The global calc will NOT recalc as such. You need to reference a field that will make it retrigger. Either reference another global field in the same table with the current date ( set it with opening script ) or you can just simply have your opening script set it to the the value that you want from the get go. If nothing retriggers the global calc, it will take the value of what it calculated at the time it was served, much like any other global.
Recommended Posts
This topic is 6141 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now