Grouping in a V7 form

24 views
Skip to first unread message

Volker Trapp

unread,
Dec 18, 2025, 8:54:57 AM (yesterday) Dec 18
to Jam.py Users Mailing List
I would like to group on a field in a form. I have tried to something like this


function on_view_form_created(item) {
    var grid = item.view_grid;

    grid.options.group_by = 'projektnummer';
}

but it is not the right way.
What is the way to get a grouped tableview in V7 ?grouping.PNG

Dean Babic

unread,
Dec 18, 2025, 9:56:39 AM (yesterday) Dec 18
to Jam.py Users Mailing List
Filters?

Volker Trapp

unread,
Dec 18, 2025, 10:44:18 AM (yesterday) Dec 18
to Jam.py Users Mailing List
no grouping.

Filters will only show f.e. one project.
I want to have it grouped by project

Dean D. Babic

unread,
Dec 18, 2025, 7:31:28 PM (24 hours ago) Dec 18
to Jam.py Users Mailing List
Could you describe more pls? 
Your pic has one record. Not sure how to conclude anything from it.

If you check a filter here:
https://jampy.pythonanywhere.com/
The filter is doing exactly that.

Volker Trapp

unread,
1:47 AM (17 hours ago) 1:47 AM
to Jam.py Users Mailing List
Hi Dean,

I do not see how this can be done with a filter.
Grouping is a special view on all data, while filtering is a partly view on data.

in the attached picture you can see a tableview with two groupings:
1. Group on project ( Projektnummer )
2. inside Group 1 a group on a part or article ( Anlagenbezeichnung )

grouping.PNG

Dean D. Babic

unread,
2:13 AM (17 hours ago) 2:13 AM
to Jam.py Users Mailing List
Hi Volker,

IMO now we can see that this is the data problem. 
What would be great to show is the table referential, not the UI result on the screen.

I think this is somehow related to classic BOM application, like this one:
https://billsofmaterials.pythonanywhere.com/

Jam would be using KEYS type for your articles. We see this with "selected:1" etc with 
details/sub details. I did not finish this app as per this thread:
https://groups.google.com/g/jam-py/c/avH0dELfSPE/m/kmD8I8rfAgAJ

What you are showing is some other "engine" to display this data. 
This is quite complex App migration.

r rad

unread,
4:20 AM (15 hours ago) 4:20 AM
to Jam.py Users Mailing List
Hi there,
If this is edit page, it may be a problem. 
Edit template for this page have to changed, and from javascript doing rest.

If this page is report  it can being do, with nested report level.

PS. This problem can resolved some professional tools, i think.

Radosav.

Volker Trapp

unread,
8:53 AM (10 hours ago) 8:53 AM
to Jam.py Users Mailing List
@Dean
Thanks I will think about the BOM Format you used. Probably I have to go a different way.

@Radosav
It is not an edit page since data is comming from a view. But Details wil be editable.
Still I do not understand what you mean by "can be done with nested reports" ?

r rad

unread,
9:07 AM (10 hours ago) 9:07 AM
to Jam.py Users Mailing List
With nested level of report.

Each report can have pages, and pages can have section, and subsection, etc...,
each of them you can control via break value of some variable, by your choose.
Python programming + SQL + a little formatting output. 
Nothing especially.

r rad

unread,
9:27 AM (10 hours ago) 9:27 AM
to Jam.py Users Mailing List
Volker,

Hm, if you want editable details, this is a little complicated.
You must having id for each row of parents!?!
If its true, that not be a report! 
Report have not id, for each time its may be diff ( RDBMS's don't garantee order ). 
You must have hard id value, because the relation with details.

Radosav

Drazen Babic

unread,
9:55 AM (9 hours ago) 9:55 AM
to Volker Trapp, Jam.py Users Mailing List

Some JS tree plugin might be used, but then it would not be a native Jam feature and style, probably missing CRUD.
This is the same issue with using Datatables, looks ok, but missing a lot. Depends what is needed tho. If is just a view, fine. But then, adding editabe Details in DTables is a bugger.
DT is all html, not JS - hence, no events.

The problem is, Jam works with a JS grid. And u have a nested grids, with almost like a tree dependency. And then u also have some possible calculation. To me, this is a domain of an ERP. 

I do not recall a similar view even with the official Jam video. 

A report might be possible to develop. LibreOffice Calc is used, I guess u know that.
Northwind app has one yearly report. 

BR

On Fri, 19 Dec 2025 at 9:53 pm, 'Volker Trapp' via Jam.py Users Mailing List <jam...@googlegroups.com> wrote:
@Dean
Thanks I will think about the BOM Format you used. Probably I have to go a differentnt way.
--
You received this message because you are subscribed to the Google Groups "Jam.py Users Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jam-py+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jam-py/6409c989-cf68-4b11-87e4-89b4ef315e5an%40googlegroups.com.

Dean D. Babic

unread,
10:22 AM (9 hours ago) 10:22 AM
to Jam.py Users Mailing List
Here is one JS tree:
https://www.ag-grid.com/javascript-data-grid/tree-data/

How do we know that this might work? Try to select all with CTRL+A.
What do you see?

Now try this one:
https://primeng.org/treetable 

What do you see? Sorry if it is obvious, but some readers might not know.
So Jam would need:
<script src="https://cdn.jsdelivr.net/npm/ag-grid-...@35.0.0/dist/ag-grid-community.min.js"></script>
and the code to make your nested tree.
Now look at the prices:
https://www.ag-grid.com/license-pricing/

So, can anyone enlighten me why is Jam still free? ;) 
Reply all
Reply to author
Forward
0 new messages