xpfSizeOf vs EXISTS

Post Reply
User avatar
azo
Site Admin
Posts: 11
Joined: Mon Jun 10, 2019 9:23 am

xpfSizeOf vs EXISTS

Post by azo »

Function xpfSizeOf was introduces quite long time ago.
Before standard EXISTS function was used.
According to standard EXISTS requires input value to be NOT empty.

Before EXISTS was used in the following way

Code: Select all

doc_rel_list := get_representing_product_relationship('urn:plcs:rdl:missing-std:Document_dependency_relationship', relating_doc.doc, related_doc.doc);
IF EXISTS(doc_rel_list) AND (EXISTS(doc_rel_list) > 0) THEN
   ...
Condition from above can be simplified by using xpfSizeOf

Code: Select all

IF xpfSizeOf(doc_rel_list) > 0 THEN
   ...
Ernest
Posts: 2
Joined: Mon Jun 10, 2019 11:35 am

Re: xpfSizeOf vs EXISTS

Post by Ernest »

The first case should be like this:
IF EXISTS(doc_rel_list) AND (SIZEOF(doc_rel_list) > 0) THEN
Post Reply