SmartClient Set Current Row (OrderDtl) Syntax examples

I think this should be easy, but I can’t seem to find an example in the forum, I’ve tried experimenting with some options and guessing by usinng intellisense but not getting there.

I could use either custom code or function code in this case,

I simply want to figure out the current row and after my current custom code runs I want to automatically advance to the next row.

I’ve yet to figure out where you find technical reference information for what objects are available and their methods and properties…any insight on this would be great also

appreciated, Scott

What are you trying to do?

I’m on Order Detail screen, I want to to advance to the next Order Detail row (via code not the UI)

This is in Classic/Smart Client, it can either be Custom Code or Function
(I’ve managed to figure out in Kinetic/Web-UI)

It will have to be custom code in the form. Server has no context of what the state the form
is in.

okay, Yes, that makes sense, simple example ?

Could you flesh out what you are trying to do so I could make it relevant?

Okay, here are the specifics

  • User is in Order Line Detail (e.g. on Line 2)
  • We have a button that Creates a Job (auto schedules, etc)
    this is done via a function called by the forms custom code on the button click event
  • When that is finished we want to automatically (via code) advance to the next Order Detail line (Line 3)

That’s it, thanks

bump

private void NextLine()
{
	EpiDataView edvOrderDtl = (EpiDataView)(oTrans.EpiDataViews["OrderDtl"]);
	
	if(edvOrderDtl.dataView.Count > 0)
	{
		if(edvOrderDtl.Row < edvOrderDtl.dataView.Count - 1)
		{
			edvOrderDtl.Row++;
		}
		//else //if you want it to loop...
		//{
		//	edvOrderDtl.Row = 0;
		//}
	}
}

Thanks Kevin…I so with there was documentation for this kind of thing, it’s so trial and error

@klincecum

I have converted a bunch of custom code that this post was related to, to functions as we move to Kinetic-Web, Is there a way to get access to Dataviews from functions so I might accomplish this current row change idea there ?

(I’ve been playing with App Studio, Event, using the ‘row-current-set’ action without much success)