top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

update strategy expression DD_UPDATE AND (condition)

+1 vote
231 views

What this means? DD_UPDATE and ($$export_agreement =0 OR $$export_agreement =1)

i can't find anything regarding the "and" condition.

thank you very much!

posted Nov 10, 2014 by Sachin

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

DD_UPDATE, DD_INSERT, ... are only readable names for constants used by Update Strategy :

DD_INSERT   0
DD_UPDATE   1
DD_DELETE   2
DD_REJECT   3

So the Update Strategy simply uses the return value of the expression, whatever is returned.

For this example, suppose different values of $$export_agreement :

 •If $$export_agreement is 0, the return value is 1, which means Update.
 •If $$export_agreement is 1, the return value is 1, which means Update.
 •If $$export_agreement is 2, the return value is 0, which means Insert.

I don't know if it's what was intended, but I would suggest you write it in a more explicit way :

iif( $$export_agreement =0 OR $$export_agreement =1, DD_UPDATE, DD_INSERT)
answer Nov 11, 2014 by Shweta Singh
...