Number of hits for progress bar

Author: (Colin)

Hi, The progress bar is a great idea however to use it you have to lose the advantage of a stepped hitlist. This is ok for a few hundred or even a thousand records but no good if there are a *LOT* of records. My wish is that uniface provide something like the equivalent of the sql 'select count(*)'. It could use the same profiles that the normal retrieve does but not return any records, just the count that match the selections. That count can then be used as the base for calculating the progress so far. Thanks, Colin Douglass


  1. Hi, as far as I remember we changed the retrieve behavior for this like below: setocc "ENT A" lookup myVar = $status if (myVar > 0) retrieve "ENT A" If you have different Entities on one form, you have position the active path to the recommended Entity. If you use retrieve/a then setocc must the occurrence with the profile. Best regards Thomas

    Author: Thomas.Young (
  2. Hi Colin, Further to Thomas' hint - if you specify the 1st parts of the key you're using - or other field values used in the retrieve profile - lookup will still return the records that match the profile.... Cheers, Knut

    Author: Knut (
  3. Thank you Thomas and Knut. This is exactly what I was after. I just didn't know it existed. Col.

    Author: Colin (
  4. Hello, just a little warning: lookup statement might be very tricky, if you use where in the read trigger. Lookup returns the number of occurrences that match the current profile - it does not fire any read trigger and therefore ignores conditions in where trigger. So, lookup might return 100 but then you retrieve only 50 occ's. By the way, that's why lookup statement is useless for us (we use where almost everywhere, because many things just can't be achieved using retrieve profile). Kind regards, Zdeněk

    Author: sochaz (