Hi listers,

I have a question for developers. I've got a solution, but I want to know
if there is a better option, since it doesn't satisfy me 100%.

Here's the case (It's not really my case, but a simplified version of it):

I have one form: AAA:Invoices.
This form has a table field that shows related requests on AAA:DetailLines.

So each invoice in AAA:Invoices is related to several Detail Lines in
AAA:DetailLines.

I have a field in AAA:Invoices that is a parameter used to compute the
value of the detail lines. I call it: InvoiceParameter.
I have a filter that when InvoiceParameter is changed, it propagates it to
all related detail lines. When those lines are modified, they automatically
(with filters) recalculate their value.

I also have a total value field at AAA:Invoices that it is the sum of the
detail lines. I want to keep it updated, so I thinked some options, but
concurrency makes the result going wrong.

Summarizing the case: The objective is that when modifying the field
InvoiceParameter at an Invoice, it propagates to the detail lines,
recalculating its value, and returns to the invoice with the total as the
sum of all detail lines.

If I do it with a filter, the contents of the table at AAA:Invoice is not
updated until the end of the transaction. So I can't see the new values.
And If I use parameter sending, only one of the detail lines, do actually
change the value, the rest are lost, (beacuse concurrency).

Using the override phase at PUSH actions, it overrides the ARS action, but
not the SQL sending, that is sent at the end.


My solution is to have a filter at AAA:Invoice that propagates the
InvoiceParameter to the detail lines. Then the detail lines compute the
result and make a PUSH to the Invoice marking a flag field (so no
concurrency error is possible).  Then an escalation executes at every
minute on marked invoices, that computes the total.

I hate using escalations for complex computations. Do you know any other
way to achieve my objective without escalations?

Jose M. Huerta
Project Manager**

Movil: 661 665 088

Telf.: 971 75 03 24****

Fax: 971 75 07 94****

<http://www.sm2baleares.es/>****

SM2 Baleares S.A.
C/Rita Levi ****

Edificio SM2 Parc Bit****

07121 Palma de Mallorca****

          <http://es-es.facebook.com/pages/SM2-Baleares/158608627954>
  <http://twitter.com/#!/SM2Baleares>
     <http://www.linkedin.com/company/sm2-baleares>

La información contenida en este mensaje de correo electrónico es
confidencial. La misma, es enviada con la intención de que únicamente sea
leída por la persona(s) a la(s) que va dirigida. El acceso a este mensaje
por otras personas no está autorizado, por lo que en tal caso, le rogamos
que nos lo comunique por la misma vía, se abstenga de realizar copias del
mensaje o remitirlo o entregarlo a otra persona y proceda a borrarlo de
inmediato.****

P Por favor, no imprima este mensaje ni sus documentos adjuntos si no es
necesario.

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug12 www.wwrug12.com ARSList: "Where the Answers Are"

<<image001.jpg>>

<<image004.jpg>>

<<image003.jpg>>

<<image002.jpg>>

Reply via email to