B4J Question [ABMaterial] ABMTable column count ?

peacemaker

Expert
Licensed User
Longtime User
Hi, All

Simple question - how to get qty of columns ?
 

MichalK73

Well-Known Member
Licensed User
Longtime User
make a loop from 1 to 1000. start reading a cell in the table of the first row and a column from the loop 1 to 1000. if there is an error reading a given cell, it means that the number of columns in the table is the value of the loop minus 1
 
Upvote 0

MichalK73

Well-Known Member
Licensed User
Longtime User
a bit of a weird question. When you create a table, you specify how many columns it should have. you also know how many rows you are throwing into the table.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
When you create a table
I have an interface with dynamical several tables generation.

And it's rather ... weird to store, say, SQL cursors (as the info source) and also visual tables.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
I think, i have to prepare the map with table parameters: id, title, rowcount, columncount... That must be always in the .Tag of each table, filled during the table creation...
 
Upvote 1

MichalK73

Well-Known Member
Licensed User
Longtime User
But if you create a dynamic table, you can store the size of the row and column table in some variable: list or map. It is 1000 times faster to read the size of a dynamic table from a variable than to read the size of a table like I gave you.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
I mentioned this in the prev post... Seems, no better variant with this JS.
 
Upvote 0

MichalK73

Well-Known Member
Licensed User
Longtime User
UPS sorry :). Fact. You can actually write in the Tag table, or if you do not want to provide it, hide it on the server side in a variable as mentioned.
 
Upvote 0
Top