Plugin Contributor
Kim L
(@kimmyx)
Hi @amweb1969,
If all columns are already present in the table (using your joined table as the data source), your entry in the computed field will look something like:
{:col1} - ({:col2} + {:col3})
The calculation above will return the exact result. Just replace col1,col2, col3 with your column headers. ☺️
Let us know how it goes.
Thanks Kim, but most probably I wasn’t able to explain correctly what I want …
This is the query that I need to fill the field ‘difference’ (the best option would be if ‘difference’ is a computed field):
table1.field –
(
SELECT SUM(table2.amount)
FROM table2
WHERE table2.id_project = table1.id_project
)
Thanks again
Monica
Thank you for the additional information, Monica.
If I understand your requirements correctly, you want to access the parent data in your computed field. Because this data is not directly available in a computed field, you must first save it in your postQuery before using it in your computed field.
We made an example because other users might find it interesting as well. The example is available here:
https://docs.rad.wpdataaccess.com/tutorials/technical-tutorials/use-parent-data-in-computed-field.html
Hope this helps. Please let us know if you require further assistance.