OrdCreate

Moderator: Rathinagiri

Post Reply
arroya2
Posts: 160
Joined: Thu Aug 06, 2009 7:16 am

OrdCreate

Post by arroya2 » Sat Jan 05, 2013 11:53 am

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

User avatar
esgici
Posts: 4363
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 246 times
Been thanked: 91 times
Contact:

Post by esgici » Sat Jan 05, 2013 12:50 pm

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 ) 
Viva INTERNATIONAL HMG :D

arroya2
Posts: 160
Joined: Thu Aug 06, 2009 7:16 am

Post by arroya2 » Sat Jan 05, 2013 10:00 pm

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

User avatar
esgici
Posts: 4363
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 246 times
Been thanked: 91 times
Contact:

Post by esgici » Sat Jan 05, 2013 10:07 pm

I'm glad by help you :)

Happy new year Rafael :)

Saludos
Viva INTERNATIONAL HMG :D

Post Reply