I have a field in a custom (Migx) table that my client would also like to see as a calculated total. The data in each field consists of a comma separated string of values representing points earned over three years, for example "0,10,5" being the 'current year -2', 'current year - 1' and the 'current year'. They would like to see a calculated field showing the total for the three years. This would involve splitting the string and calculating the total of the three values.
Can anyone suggest a quick and easy way of doing this to display the value in a Formtab or Column?
Give a man the answer, and he’ll only have a temporary solution. Teach him the principles that led you to that answer, and he will be able to create his own solutions in the future.
its possible with a renderChunk - renderer in an additional column
Use the MIGX - configurator to set the configs (formtabs and columns) for that MIGX-TV
Then you can use an output-filter in the renderChunk - tpl or a snippet, which does the calculation
Thanks Bruno, I was wondering about the renderer. I'll give it a try in the morning.
Give a man the answer, and he’ll only have a temporary solution. Teach him the principles that led you to that answer, and he will be able to create his own solutions in the future.
its possible with a renderChunk - renderer in an additional column
Use the MIGX - configurator to set the configs (formtabs and columns) for that MIGX-TV
Then you can use an output-filter in the renderChunk - tpl or a snippet, which does the calculation
Works great for columns but how do I get the totals in formtabs
Give a man the answer, and he’ll only have a temporary solution. Teach him the principles that led you to that answer, and he will be able to create his own solutions in the future.
Thanks again Bruno, as always you have made our lives a whole lot easier.
When I put this out to our client I think I can predict what is coming next so I'll ask now:
We have about 30 categories where our members may collect points over a three year period. Could formtab "Input Values" be used in a similar fashion to generate a running total of accumulated points and save the value to the database?
Give a man the answer, and he’ll only have a temporary solution. Teach him the principles that led you to that answer, and he will be able to create his own solutions in the future.