Page 1 of 1

OrdCreate

Posted: Sat Jan 05, 2013 11:53 am
by arroya2
Hola amigos quiero sustituir la orden Index que tiene una clausula For por la orden OrdCreate y no consigo que haga lo que debe hacer y os pido una ayudita.

Code: Select all

INDEX ON LibroArm->Fecha TAG MiOrden TO LibroArm.Cdx FOR LibroArm->Fecha>=fFechaIni .And. LibroArm->Fecha<=fFechaFin
¿Cómo quedaría?

Gracias
Rafael Pérez

Translated by Google:
Hello friends I want to replace the command Index that has a clause For by the OrdCreate and I can not do what it should do and I ask one little help.

Code: Select all

INDEX ON LibroArm->Fecha TAG MiOrden TO LibroArm.Cdx FOR LibroArm->Fecha>=fFechaIni .And. LibroArm->Fecha<=fFechaFin
How would it?

Thank you
Rafael Pérez

Re: OrdCreate

Posted: Sat Jan 05, 2013 12:50 pm
by esgici
arroya2 wrote:I want to replace the command Index that has a clause For by the OrdCreate

Code: Select all

INDEX ON LibroArm->Fecha TAG MiOrden TO LibroArm.Cdx FOR LibroArm->Fecha>=fFechaIni .And. LibroArm->Fecha<=fFechaFin
Hola Rafael

You can use OrdCondSet() function immediately before OrdCreate().

Something like this :

Code: Select all

OrdCondSet( "LibroArm->Fecha>=fFechaIni .And. LibroArm->Fecha<=fFechaFin", { || LibroArm->Fecha>=fFechaIni .And. LibroArm->Fecha<=fFechaFin } )
OrdCreate(  "LibroArm.Cdx", "MiOrden", LibroArm->Fecha ) 

Re: OrdCreate

Posted: Sat Jan 05, 2013 10:00 pm
by arroya2
Esgici muchas gracias, ahora funciona perfectamente. Yo creía que se podía establecer el ámbito en el bloque del comando OrdCreate

Code: Select all

OrdCreate( "LibroArm.Cdx", "MiOrden", "LibroArm->Fecha", {|| LibroArm->Fecha>=fFechaIni .And. LibroArm->Fecha<=fFechaFin} )
He probado lo que me has indicado y funciona correctamente.

Feliz año nuevo
Rafael Pérez

Translated by Google:
Esgici thank you very much, now it works perfectly. I thought I could set the scope of the command block OrdCreate

Code: Select all

OrdCreate( "LibroArm.Cdx", "MiOrden", "LibroArm->Fecha", {|| LibroArm->Fecha>=fFechaIni .And. LibroArm->Fecha<=fFechaFin} )
I tried what you have shown me and working properly.

Happy new year
Rafael Pérez

Re: OrdCreate

Posted: Sat Jan 05, 2013 10:07 pm
by esgici
I'm glad by help you :)

Happy new year Rafael :)

Saludos