Consulta Browse

Moderator: Rathinagiri

Post Reply
Mario Mansilla
Posts: 269
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina

Consulta Browse

Post by Mario Mansilla »

Hola :
Necesito implementar un control browse donde alguno de los campos sea una funcion , desde la cual obtengo el valor que muestro en el control .
Esto lo hacia sin problemas con edit de clipper , pero en hmg me da error de nombre de parametro Campo .
Alguien ha implementado esto ?

Saludos cordiales
Mario Mansilla

Hello:
I need to implement browse control where one of the fields is a function, from which get the value show in the control.
This is to edit smoothly with clipper, but I get error hmg name parameter field.
Has anyone implemented this?
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Consulta Browse

Post by mol »

I'm using such a construction:

Code: Select all

function FieldFromDB
	param xWorkArea, xFieldName, xWhatToSeek, nOrder
	local nTempOrder
	
	ntempOrder := (xWorkArea)->(IndexOrd())
	if type("nOrder") == "N"
		(xObszar)->(DBSetOrder(nOrder))
	endif
	(xWorkArea)->(DBSeek(xWhatToSeek))
	(xWorkArea)->(DBSetOrder(nTempOrder))
return (xWorkArea)->(&xFieldName)
When defining array of field names for BROWSE control, you can use FieldFromDB function:

Code: Select all

	aFields	:= {"rodzaj", "NrMagazynu", "alltrim(Nr_faktury)", "data", "klient", 'FieldFromDB("klient","nazwa3",(obnagl)->klient)',;
				"wartoscA+wartoscB+wartoscC+wartoscD+wartoscE+wartoscF+wartoscG" }
it really works!

Nice testing!
Mario Mansilla
Posts: 269
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina

Re: Consulta Browse

Post by Mario Mansilla »

Hola Mol :
Perfecto , voy a implementarlo de esa manera ; es decir definir el array fuera del IDE .
Yo declaro los campos desde el IDE , sera por alli el error , porque me da error en la linea correspondiente al FMG .
Lo pruebo y te aviso .
Muchas gracias .

Saludos
Mario Mansilla

Hello Mol:
Perfect, I will implement it in this way, ie define the array outside the IDE.
I declare the fields from the IDE, the error will be over there, because I get error on the line for the FMG.
I try and be forewarned.
Thank you very much.

regards
Mario Mansilla
Mario Mansilla
Posts: 269
Joined: Wed Aug 13, 2008 2:35 pm
Location: Córdoba - Argentina

Re: Consulta Browse

Post by Mario Mansilla »

Hola Mol :
Funciono perfecto , aun declarando el array en el IDE .
Muchas gracias
Saludos
Mario Mansilla

Hello Mol:
It worked perfect, even declaring the array in the IDE.
thank you very much
regards
Mario Mansilla
Post Reply