Question

API operator "emptyornull"

  • 14 November 2023
  • 0 replies
  • 72 views

Userlevel 4
Badge +11

Hi,

 

Did someone know how to use the operator "emptyornull"  of the conditions in API ; I tried different ways and also the API below without success to fill in the description of a product with a default value when empty or null :

 

If this operator doesn't work , is there another way to do that ?

when importing data from an excel file threw API mapping (and not BO field mapping)  I want  to put a default value for a column when empty.

 

<root xmlns:dt="urn:schemas-microsoft-com:datatypes">
<session email="" alias="">
<state bc_name="product">
<action name="data">
<main>
<row number="1">
<bpart_id>MyPart</bpart_id>
<descr>
</descr>
<condition>
<if>
<left><![CDATA[descr]]></left>
<op><![CDATA[emptyornull]]></op>
</if>
<true>
<descr>Default Description</descr>
</true>
<false>
<descr>The Description</descr>
</false>
</condition>
</row>
</main>
</action>
</state>
</session>
</root>

Thanks and Regards

anthony


0 replies

Be the first to reply!

Reply