Skip to main content
Question

question to API syntax

  • August 9, 2022
  • 1 reply
  • 123 views

Forum|alt.badge.img+7
  • Sidekick (Customer)

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>

Forum|alt.badge.img+7
  • Sidekick (Customer)
  • August 9, 2022

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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings