Hello everyone,
I have this question confusing me since forever, When do I use fields and when to use variables to have dynamics values calculated when opening a page?
what's wrong with the use of fields from a table instead of variables ?
Thanks in advance
0
Answers
Take, for instance, the Item Statistics page. You can show values per day, week, month, year. Those values are calculated based on the user selection when the matrix is calculated. There is no way to provide those values as flowfield values. Let's say you want to show values by month. Do you create 12 fields for 12 months at the table level? Is that enough? What about the need to compare last year's values? Do you create 24 columns for month? Let's say you want values by week, how many fields do you create? 12 for a quarter? 26 for half a year? 52 for a whole year? Do you then need 104 columns to also have last year's numbers?
A statistics page uses the same field and calculates it however many times you need for however many columns you need. You start the Item Statistics page and debug it, with selecting different settings. See what it does, discover how it works. Do the same for Customer Statistics, and order statistics. Get a feel for how it really works.
RIS Plus, LLC
Besides, you'd be storing calculated values that are dynamic and out of date as soon as you post a new transaction. You'd also have to calculate those values every time you open the page anyway, to make sure that the numbers are still correct.
Using the current capability, you'd create 5 flowfields with a dependency on a 'Date Filter' flowfilter, and all you have to do is reset the filter and do a CALCFIELD and you're done with just a couple lines of code.
RIS Plus, LLC