Count documents in embedded view

Hi,

I have database for creating vacancies and candidates.

I create candidate, assign him to vacancy. Once I open vacancy form, I am using embedded view to show candidates, which are suitable for current vacancy. I have view on database open, where I am displaying vacancies. In this view I need to show how many candidates are assigned for each of vacancy. @dblookup is not working on view. I created help field on vacancy form and this field I put on vacancy view, I can count how many candidates are assigned for vacancy in this field using @dblookup, but once the change on candidate assignement to another vacancy is made, field to calculate no. of candidates is not refreshed, only on edit/save of vacancy form.

any ideas? how can I count documents in embedded view and then display it in another view?

help much appreciated.

Miro

Subject: count documents in embedded view

I think the best way to do this is to write some code into the candidate form querysave that checks the current number of candidates then updates the vacancy doc.

This can lead to problems if you’re updating the vacancy doc at the same time due to save conflicts so you’ll have to think about the process a bit - but from what you say this shouldn’t be an issue for you.

Subject: RE: count documents in embedded view

You can either update the field on query save as Dan has suggested. or

Write a scheduled agent which updates the help field on the vacancy documents. This though creates a brief period of inconsistency in the system.

Rakesh

Subject: RE: count documents in embedded view

Thanks for your ideasMiro