I've created an aot query against the PurchLine table with a sum of LineAmount grouped by PurchId and am getting multiple rows (one per purchline record) when I check a view against the query. Please advise. Below is the query. DataSource set to no Dynamic Fields.
Thank you, an article I was following was showing to have a query also behind the view which as you stated was not needed. Just the view makes more sense from a database perspective.
Note that you don't a query at all. You could have set it directly in the view and you wouldn't have to deal with two different things.
This seemed to work from testing. That is just funky how they did this. The grouping was defined in the query and then you have to define it again with the view?
Appreciate the help all.
You need to do it directly on the view field. Set the Aggregation property to Sum.
So spitting out the contents from running the query in a runnable class is looking like the query is not duplicating the records. So how do I use the query with the view then without the duplicates? It is not letting me drag the sum onto the field list in the view?
I am trying this from AOT query and qot view, to add a field to all purchase orders form. purchtable form. the runnable class was to try to test why I'm getting dupes and to isolate it a problem with the query or view.
I do not see the queries defined anywhere in SSMS? I see the views though.
Also if you just needs to see the records with that query, simply fire the same SQL query in SSMS. It is more simpler.
The process is correct. If it is not working then you need to check if sync is done perfectly.
The other simpler approach is to write a while select statement grouping on purchid and returning each purch I'd and sum of the line amount in the runnable job.
I am trying to print the output of the query with a runnable class, I'm not aware of another way to get the output from the query, the view seemed to be the easiest way.
André Arnaud de Cal...
292,074
Super User 2025 Season 1
Martin Dráb
230,900
Most Valuable Professional
nmaenpaa
101,156