Scriptcase v8 improvement - access grid row line number through a sc variable

Hello,

I would like to ask to scriptcase team if it is possible to get on the next scriptcase improvements the access to the row line number on grid application.
If something like a sc variable ( {rownumber} ) would be accesible I think it will help a lot to control the content of the grid pages.
or the moment it seems that the row line is a kind of i++ variable in php and not accesible.

I hope this is the proper disucssion flow to adress this upgrade.

Regards,

Alex

Not sure what you try to achive, but meanwhile, you can.

Create a virtual field called rowline, and move out from visible fields on Fields Positioning

onHeader

[therowline] = 0;

onRecord

[therowline] += 1;
{rowline} = [therowline];

Application Globals
Set [therowline] as Out

Hello,

I did it but then I want to retrieve {rowline} in a grid php run button on the onrecord and onfinish event and this is not working.

R.

​Alex

sc_seq_register [TABLE=“class: macros_desc_table”]
[TR]
[TD] This macro provide the record (being processed) grid sequential number. It can be used, only in onRecord event.

		[B]Ex. 1:[/B]
		if({sc_seq_register} == 10) {
		// last line of the page
		{total} = {sum_total};
		}
		[/TD]
	[/TR]
 [/TABLE]
[B]Macro Scope[/B]

[TABLE=“class: macros_desc_scope_table, cellpadding: 0, cellspacing: 0”]
[TR]
[TD]Grid application[/TD]
[/TR]
[TR]
[TD=“width: 120px, bgcolor: #f7f4f4”]onRecord[/TD]
[/TR]
[/TABLE]

The macro sc_seq_register only can be used in a GRID onRecord event, not BUTTON : RUN onRecord event, which is what the original poster was talking about.

Creating a virtual field does not help either because it is not accesible in the BUTTON : RUN on Record event

The only way that works is if the line number came from database select results.
e.g. by adding a ROW_NUMBER field in the original SELECT statement