Thanks so much for the new Computed Fields feature - I can think of a dozen use cases for it across my different sites.
Currently, I have something similar-ish using custom hidden fieldtypes in one of my addons which I'm aiming to replace with this feature.
However, some of them are computed fields inside a Grid field.... I have a Grid field called 'Line Items' and inside that I have the product, price, etc. If I wanted to make two new computed fields on each line item (like tax_price or raw_price), I don't currently see a way of doing it...
I've tried these two options, neither work.
Collection::computed('orders', 'line_items.raw_price.', function ($entry, $value) {
return 'something here';
});
Collection::computed('orders', 'line_items.*.raw_price.', function ($entry, $value) {
return 'something here';
});
Thanks so much for the new Computed Fields feature - I can think of a dozen use cases for it across my different sites.
Currently, I have something similar-ish using custom hidden fieldtypes in one of my addons which I'm aiming to replace with this feature.
However, some of them are computed fields inside a Grid field.... I have a Grid field called 'Line Items' and inside that I have the product, price, etc. If I wanted to make two new computed fields on each line item (like
tax_price
orraw_price
), I don't currently see a way of doing it...I've tried these two options, neither work.