Schedule.prg is the program I worked on with two other FW developers, which we shared freely, and it is fine to be in the samples. It uses the Codejock library.
This specific version is pretty enhanced, and is used by most of my clients very heavily. It allows for very detailed appointments, repeating ones, assigning people to them, tracking clients and their service items, color coded work types, and much more. It displays like Outlook, and allows multiple appointments for the same, or overlapping, times.
Tim
The version i see 17.15 is giving errors. Is there a newer version ? I would like to see it.
for n = 1to15 if ! Empty((Alias())->( IndexKey( n ))) cCode += CRLF + CRLF + "INDEX ON " + (Alias())->( IndexKey( n )) + ; If((Alias())->( RddName()) == "DBFNTX", " TO ", " TAG ") + ; (Alias())->( OrdName( n )) endif next
To have the complete picture, we can also add FOR conditions for indexes (I use them a lot)
for n = 1to15 if ! Empty((Alias())->( IndexKey( n ))) cCode += CRLF + CRLF + "INDEX ON " + (Alias())->( IndexKey( n )) + ; If((Alias())->( RddName()) == "DBFNTX", " TO ", " TAG ") + ; (Alias())->( OrdName( n )) IF !Empty( OrdFor(n)) cCode+= ' FOR '+OrdFor(n) ENDIF endif next
A question: ¿Is there any reason to call the functions prefixed with '( Alias() )->()'? I think it has no efect aliasing the current workarea. May be there is a missing parameter for the Alias() call...
I see here options to create indexes, but has someone a option (code) for the folowing :
I have a app. (Xbrowse) with lots of fields and already many indexes.
I see that I often need a other index to sort the data a better way. Is there a sample that will build a index while te program is running ? or a function that will give all fields and where we can put a kind of rule to create a index ?
Hello, If you want to create index purely in memory you can use ( cAlias )->( FW_CdxCreate( niL, .T. ) ) --> lSuccess Note: Creation in memory if available only in the recent versions 17.09 and 17.11
BTW- does someone know if there is a Limit of TAGs you can create. I do not see any limitation in FW_CdxCreate .
FW errorsys.prg Looks for j = 1 to 15 . I will remember that 15 was the maximum at Clippertimes. If this is still true I think in FW_CdxCreate we need a limitation if it is not true errorsys needs an update.
for n = 1to15 if ! Empty( IndexKey( n )) cCode += CRLF + CRLF + "INDEX ON " + IndexKey( n ) + ; If( RddName() == "DBFNTX", " TO ", " TAG ") + ; OrdName( n ) if ! Empty( OrdFor( n )) cCode += ' FOR ' + OrdFor( n ) endif endif next
Marc Venken wrote:I see here options to create indexes, but has someone a option (code) for the folowing :
I have a app. (Xbrowse) with lots of fields and already many indexes.
I see that I often need a other index to sort the data a better way. Is there a sample that will build a index while te program is running ? or a function that will give all fields and where we can put a kind of rule to create a index ?
FiveDBU lets you create new Indexes tags on the run
n = 1 while ! Empty( IndexKey( n )) cCode += CRLF + CRLF + "INDEX ON " + IndexKey( n ) + ; If( RddName() == "DBFNTX", " TO ", " TAG ") + ; OrdName( n ) if ! Empty( OrdFor( n )) cCode += ' FOR ' + OrdFor( n ) endif n++ end