forceDerivedValueUpdate Only Updates Values for Entries on Current Screen
This may be a feature instead of a bug, but it was my understanding that using the &forceDerivedValueUpdate=1 in the URL would update ALL entries in the database for derived value fields. However, it doesn't do that for me; instead it only updates for the form or framework entries currently showing on the page and thus I have to click on each page number to get those values updated. My future database could be larger than the 30 pages I just did.
Maybe I'm reading the documentation incorrectly?
XOOPS 2.3.3b
Formulize SVN Revision 322


Comments
Yeah, a feature not a bug. :-)
The thing is, only the current page of entries is retrieved from the database, so only the current page of entries is available for evaluation.
But if you make a quick list of entries screen, and just set it to show all entries from all groups, and set the number of entries per page to "0" then it will load up all entries, and if you then do that with the right URL param that you mentioned above, then you will get an update of all entries. But it might take a while to load, depending how many entries you've got, if it's a framework, what the relationship is, how many derived values you've got, etc.
--Julian
Understood; Doc Suggestion....
Fair enough. When reading it in the documentation, I got the idea that it did all entries in the form/table.
And I realized I could go build a quick screen with a large number of entries/page, but with what we currently had, I went with the really quick solution until I understood what was supposed to happen.
I suggest that the future documentation clearly clarify that it only updates the entries currently showing on that particular resultant screen (I use resultant screen because I discovered that if I was on page three, but then added it to the URL, that it only updates the first screen of entries -- which makes sense because of how the submit/get request is made to the server).
Thanks, as always for your replies and guidance on the module.
I'll save this for a doc update next release
Thanks Mark. I will save this so we're sure to update the docs about it next release.
The purpose of the override is for debugging, since the values are only changed when saving entries. So if you change the formula, but update the list over and over again, the values won't change. So this URL param lets you see your changes take effect, that's all.
I would like to see derived value formulas handled differently in the future, so that you have the option of applying changes to all existing data when you save them, for one thing, and also so they are compiled to files when you save them, rather than at "runtime" which is how it's done now (a legacy from when there were no derived values stored in the database at all so everything was runtime).
Do you get the feeling that's lots of interesting things for developers to work on in Formulize? We can always use coding help. :-)
--Julian