DBLookup / All Documents in a view

Hello,

I am trying to summarize all documents in a view for a report.

rp4_vacancies:=@Elements(@DbLookup(“”:NoCache;“”;“Current Occupancy”;sitekey;2));

@If(@IsError(rp4_vacancies);“”;rp4_vacancies)

The code above only evaluates for the one sitekey. So it would return a value of say “5”. I need it to cycle through all the unique sitkey’s and give me a total for each in one report.

My view contains occupants in different places. I need to provide a list of how many occupants (occupany form) have been created for each place (site form).

Any help appreciated.

Raemond

Subject: DBLookup / All Documents in a view

The following assumes your occupancy form contains the site ID. If it does not there is no way to relate the data, unless you’re using response docs or something else as a key.

  1. Build a view that selects all the occupancy documents.

  2. Make the first column a Totals put a value of 1.

  3. Make the second column the site key and categorize it.

This will show the number of occupancy documents per site. If someone double-clicks one of the sites it will expand and not show them anything but a bunch of blank lines, but if this is just used for review that shouldn’t be a problem.

Hope that helps,

Charles