RichardPfister
8 years agoQrew Cadet
Conditional API_EditRecord Statement
I am new to xml so I'm having some trouble with a simple if-then statement in my API call.
I want to say, If FieldA is not blank then edit fid 10 on the endpoint table to equal FieldA, else edit it to equal FieldB. This is my latest attempt.
<qdbapi>
<usertoken>123456789</usertoken>
<rid>34</rid>
<if cond="[FieldA]!=''">
<field fid='10'> [FieldA] </field>
<else/>
<field fid='10'> [FieldB] </field>
</if>
</qdbapi>
Can anyone advise where I'm going wrong?
I want to say, If FieldA is not blank then edit fid 10 on the endpoint table to equal FieldA, else edit it to equal FieldB. This is my latest attempt.
<qdbapi>
<usertoken>123456789</usertoken>
<rid>34</rid>
<if cond="[FieldA]!=''">
<field fid='10'> [FieldA] </field>
<else/>
<field fid='10'> [FieldB] </field>
</if>
</qdbapi>
Can anyone advise where I'm going wrong?