Question

question to API syntax

  • 9 August 2022
  • 1 reply
  • 103 views

Userlevel 3
Badge +7
  • Sidekick (Customer)
  • 34 replies

Hi,

maybe someone can help me with API syntax.

I have an API request, which has two queries. Based on the result of the first query, I want to put this as variable into second query. But I am doing something wrong.

 

What need to be changed, that the result (in this case it is “41”) can be used for second query? Can anyone help?

 

Screenshot and API request below.

 

Thanks in advance and best regards

Torsten

 

 

API is the following:

 


<root initiator="phone_search"
    xmlns="http://astea.com.schema.bc.Service_Order">
    <session email="" alias="">
        <state bc_name="Service_Order" is_allow_save_changed="true">
            <action name="declare">
                <attribute dtype="string" in_var="" out_var="checklistresult" name="result_value" value=""/>
                <attribute dtype="string" in_var="" out_var="" name="answer" value=""/>
            </action>
            <action name="getdescrtableex">
                <attribute in_var="" out_var="result_value" table_name="checklist_result" element_name="result_value" search_criteria="order_id = 'SV2208090033@@1' and descr_res = 'Answer Subject'  " default_value=" does not exist"/>
            </action>
            <action name="getdescrtableex">
                <attribute in_var="checklistresult" out_var="answer" table_name="ans_list_lines" element_name="answer" search_criteria="unique_id = '41' " default_value=" does not exist"/>
            </action>
        </state>
    </session>
</root>


1 reply

Userlevel 3
Badge +7

update: for myself i could solve it by splitting into two api calls instead of one from external system. 

Reply