Depends what you mean with a better way? If this is a common thing you do, you could create an addin/add script to jmps menus/toolbar which you could ran to do this. To create column you could use something like this (and if you want to create the graph builder always when script is ran, it can also be easily added):
Names Default To Here(1);
Local({dt},
dt = Current Data Table();
If(N Cols(dt) == 1,
dt << New Column("no", Numeric, Ordinal, << Set Each Value(Row()))
);
);
You can also add the column directly from New Columns:
![jthi_0-1641461913221.png jthi_0-1641461913221.png](https://community.jmp.com/t5/image/serverpage/image-id/38755i0712272296077E7E/image-size/medium?v=v2&px=400)
Or create temporary column when using graph builder:
![jthi_1-1641461963630.png jthi_1-1641461963630.png](https://community.jmp.com/t5/image/serverpage/image-id/38756iB4C2546747AF8AC2/image-size/medium?v=v2&px=400)
This column can be added to Data table if needed:
![jthi_2-1641461996940.png jthi_2-1641461996940.png](https://community.jmp.com/t5/image/serverpage/image-id/38757i09E47E9492DA6D9E/image-size/medium?v=v2&px=400)
-Jarmo