http://ofbiz.116.s1.nabble.com/Re-svn-commit-r429000-incubator-ofbiz-trunk-applications-product-script-org-ofbiz-product-promo-Proml-tp170388p170390.html
minilang operations. The plan for the official docs is to move them
the reference stuff). I've done some work on this here and there, ie
moving stuff over and adding detail to the XSD for new stuff.
transcription of course....
> David,
>
> Thanks, this was not obvious. Is therre somewhere an update for
> minilang documentation (set, etc.) ? I revert for the moment and
> will make a new patch soon.
>
> Jacques
>
>
>>
>> On Aug 5, 2006, at 7:57 AM,
[hidden email] wrote:
>>
>>> Modified: incubator/ofbiz/trunk/applications/product/script/org/
>>> ofbiz/product/promo/PromoServices.xml
>>> URL:
http://svn.apache.org/viewvc/incubator/ofbiz/trunk/>>> applications/product/script/org/ofbiz/product/promo/
>>> PromoServices.xml?rev=429000&r1=428999&r2=429000&view=diff
>>> ====================================================================
>>> ==
>>> ========
>>> --- incubator/ofbiz/trunk/applications/product/script/org/ofbiz/
>>> product/promo/PromoServices.xml (original)
>>> +++ incubator/ofbiz/trunk/applications/product/script/org/ofbiz/
>>> product/promo/PromoServices.xml Sat Aug 5 06:57:23 2006
>>> @@ -29,14 +29,13 @@
>>> <sequenced-id-to-env sequence-name="ProductPromo" env-
>>> name="newEntity.productPromoId"/>
>>> <field-to-result field-name="productPromoId" map-
>>> name="newEntity"/>
>>>
>>> - <if-empty field-name="newEntity.userEntered">
>>> - <string-to-field string="Y" field-
>>> name="newEntity.userEntered"/>
>>> - </if-empty>
>>> + <set value="Y" set-if-empty="true"
>>> field="newEntity.userEntered"/>
>>> +
>>
>> There was at least one more of these in this commit, but I'll just
>> use this one as an example.
>>
>> There is a problem with this because the set operation is not
>> equivalent to the if-empty + string-to-field. In other words, you
>> still need the if-empty around the set operation.
>>
>> The reason is that if newEntity.userEntered is NOT empty then with
>> the if-empty tag it will do nothing, but without the if-empty tag it
>> will still do the set operation!
>>
>> In other words, the set-if-empty attribute does not mean "set only if
>> empty" it means "set if empty or not empty".
>>
>> -David
>