TAGELEMENT in DCBROWSE

This forum is for eXpress++ general support.
Post Reply
Message
Author
Victorio
Posts: 631
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

TAGELEMENT in DCBROWSE

#1 Post by Victorio »

Hi,

I want implement Tag elements to browse database.
In example TAGGING is present this function, but with array (in array is directory).
I want same with browse database (DCBROWSE...., DCBROWSECOL FIELD....)

In database I have 34 fields, what must be in element TAGELEMENT ? number 35, or any name SEL, or what ?

After selecting records I want filter this records, apply FILTER for example SET FILTER TO SEL=.T.)

I do not understand, what is nElement in TAGELEMENT nElement, and if is possible apply it to browse database, or only for array

Thanks.

skiman
Posts: 1189
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: TAGELEMENT in DCBROWSE

#2 Post by skiman »

Hi,

Don't use filter after tagging records. Look at dc_setscopearray(). This is very fast, filtering is very slow.

I don't use the tagelement, I can't help with that.
Best regards,

Chris.
www.aboservice.be

Victorio
Posts: 631
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: TAGELEMENT in DCBROWSE

#3 Post by Victorio »

Now I examine DC_Tagged(),
I used :
SET FILTER TO DBFILE->(DC_Tagged())

after Tagged record.
It look good, but I am not try it on large database.

I will look dc_setscopearray(), thanks.


So excuse me my english : :oops:

User avatar
Tom
Posts: 1177
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: TAGELEMENT in DCBROWSE

#4 Post by Tom »

If a filter must be used, take a look at SET SMARTFILTER ON. This causes any browsed record to be only checked once for the filter condition. Don't forget to switch it off afterwards. If the data changes, call "DbRefresh()", which resets the smartfilter. It will increase the speed of a database browse. I guess it works quite similar to Roger's scopearray.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Victorio
Posts: 631
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: TAGELEMENT in DCBROWSE

#5 Post by Victorio »

thank´s

skiman
Posts: 1189
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: TAGELEMENT in DCBROWSE

#6 Post by skiman »

Hi Tom,

The system of Roger is very powerfull because you can use a multi-dimensional array. I'm using this to make sorting of a browse superfast.

I search for example for customers which bought the last year. I fill an array with the record number, and in the second element the name of the customer.
Now I can sort the array on the second element, and I get a sorted and selected list.
If I want the same selection now sorted on city, I replace my second element with the city, I sort the array, and I get a sorted list.

The result is Browsing in databases with easy and fast sorting on each column without any index on this columns.

So dc_setscopearray is a lot more than just scoping or filtering. :clap:
Best regards,

Chris.
www.aboservice.be

User avatar
Tom
Posts: 1177
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: TAGELEMENT in DCBROWSE

#7 Post by Tom »

Hi, Chris.

I know this, I do use it myself. I just wanted to mention that if there's a need to work this way - to set a filter on a large database browse -, the smartfilter maybe a good idea. We have a system to watch all data coming in through our SOAP-interface connected to our mobile apps. This table can get very large, but sometimes it's needed to set a filter on this (find data containing something, like the license number of a car or even parts of it). The smartfilter increased the speed of this, since the filter condition is only evaluated once for each record. For DC_SetScopeArray(), it is needed to evaluate conditions anyway (once, of course, like with smartfilter). There is a delay with both solutions.
And we can't move those data to an array. It doesn't make any sense.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

skiman
Posts: 1189
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: TAGELEMENT in DCBROWSE

#8 Post by skiman »

Tom,
And we can't move those data to an array. It doesn't make any sense.
Only recordnumbers are moved to the array.
Best regards,

Chris.
www.aboservice.be

User avatar
Tom
Posts: 1177
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: TAGELEMENT in DCBROWSE

#9 Post by Tom »

Hi, Chris.

You have to traverse the DBF in this situation anyway. And you have to do this with every possible change - new records, changed records, deleted records. It may be a good solution in some situations, but not in all.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

Post Reply