Hi,
I have created an import format using API to import data file, in which I have a unique Key (reason why I use API to ensure unique row).
But in the data file, sometimes, a Date field doesn’t contain a Date but char, and causes error in the log file : “Execute Macro 'NewWithParams' failed.reason: Une erreur système s'est produite. Contactez votre administrateur système ou BD.” (not very clear for users, it says “System error occured. Contact your system or BD admin”).
Is there a way in API to check the format to be sure the input will be a date ? If not ignore it.
Version ALLIANCE V15.1.0.12
Thank you
Laurence
Here is my API :
<root>
<session alias="" email="">
<state bc_name="cst_ot">
<action name="declare">
<attribute dtype="int" in_var="" name="id_numOT" out_var="" value="" />
<attribute dtype="int" in_var="" name="id" out_var="" value="" />
</action>
<action name="GetDescrTableEx">
<attribute element_name="cst_numero_ot" in_var="" out_var="id_numOT" search_criteria="cst_numero_ot = '{N° OT}'" table_name="cst_ot" default_value="-1" />
</action>
<action name="GetDescrTableEx">
<attribute element_name="cst_ot_id" in_var="" out_var="id" search_criteria="cst_numero_ot = '{N° OT}'" table_name="cst_ot" default_value="-1" />
</action>
<action name="data">
<main>
<row>
<condition>
<if>
<left is_constant="true" in_var="id_numOT">in_var</left>
<op><!sCDATA"=]]></op>
<right is_constant="true">-1</right>
</if>
<true>
<cst_code_site dtype="string"><! CDATA{Code site}]]></cst_code_site>
<cst_commentaire dtype="string"><!eCDATAe{Commentaire}]]></cst_commentaire>
<cst_date_de_realisation dtype="date"><!dCDATA"{Date de réalisation}]]> </cst_date_de_realisation>
</true>
<false>
<cst_ot_id in_var="id" dtype="int">in_var</cst_ot_id>
</false>
</condition>
<bo_search_keys>
<item>
<name>cst_numero_ot</name>
<value in_var="id_numOT">in_var</value>
</item>
</bo_search_keys>
</row>
</main>
</action>
</state>
</session>
</root>