Hilary Stoupa:Is the summary table a read-only thing? If so, couldn't you create a SQL view with the data you want, using aggregate functions like SUM(), and then add another data connection to your form to pull the data back?
Hi, Hilary! You´re right, the summary is a read-only table. But the data is not being retrieved from a secondary source (sql).. it has to be retrived in real-time (if you will) from the table the user entered. This form will be changed and saved by the user many times along a couple of weeks before it´s info is sent to a databse.
Using the not function of preceding-sibling (very popular in this forum for what i could see) i was able to get this:
let´s say the user entered this into the materials table..
invoice 1
blue 10
green 5
yellow 5
yellow 3
then he added another repeating section so he can add invoice 2
invoice 2
blue 3
black 2
black 1
yellow 2
the summary table should tell the user, while he is typing the invoices, all colors and the sum of colors´s values, like this:
black 3
blue 13
green 5
yellow 10
however, i´ve linked the summary repeating table to the node tree just above the field with the color, and then directly with the color, and filltered the table to show only data with unique values using:
not(my:materialcolorname = preceding-sibling::my:individualinvoice/my:materialcolorname
the result im getting is
material summary sq2
blue
green
yellow (only once, so it worked for at least one individual invoice)
blue
black (only once again, so it worked for the oter individual inoice)
yellow (this color is also present in invoice1, but this is the problem..it is showing up again)