Skip to main content
Solved

How to do > and < in execquery

  • September 2, 2024
  • 6 replies
  • 56 views

Forum|alt.badge.img+9

Trying to check for open service orders. 
This works, but checks for only one status. 

<root xmlns="http://astea.com.schema.bc.service_order">
  <session email="" alias="">
    <state bc_name="service_order">
      <action name="execquery">
        <attribute in_var="" out_var="" entity_name="order_locator" query_name="order_locator_scrl"
                   sort_column_direction="+" sort_column_alias="request_id"/>
        <attribute dtype="argument" name="where_cond"
                   value="(serial_no = '3090R720141') and (order_stat_uniq_id = 100)" operator="="/>
      </action>
    </state>
  </session>
</root>

I want to check for < 500, but it does not parse as valid xml.
Any ideas?

<root xmlns="http://astea.com.schema.bc.service_order">
  <session email="" alias="">
    <state bc_name="service_order">
      <action name="execquery">
        <attribute in_var="" out_var="" entity_name="order_locator" query_name="order_locator_scrl"
                   sort_column_direction="+" sort_column_alias="request_id"/>
        <attribute dtype="argument" name="where_cond"
                   value="(serial_no = '3090R720141') and (order_stat_uniq_id < 500)" operator="="/>
      </action>
    </state>
  </session>
</root>

 

Best answer by Joshua Liem

Hi Chris,

 

Try the below API

 

<root xmlns="http://astea.com.schema.bc.service_order">
  <session email="" alias="">
    <state bc_name="service_order">
      <action name="execquery">
        <attribute in_var="" out_var="" entity_name="order_locator" query_name="order_locator_scrl"
                   sort_column_direction="+" sort_column_alias="request_id"/>
        <attribute dtype="argument" name="where_cond"
                   value="(serial_no = '3090R720141') and (order_stat_uniq_id &amp;lt; 500)" operator="="/>
      </action>
    </state>
  </session>
</root>

View original
Did this topic help you find an answer to your question?

6 replies

Forum|alt.badge.img+10

Try using the XML escape codes. &lt; for < and &gt; for >


SaaAvinak
Do Gooder (Customer)
Forum|alt.badge.img+7
  • 18 replies
  • September 2, 2024

Hello @csjohnstone ,

try using &lt; for the less-than

Hope that works. 

value="(serial_no = '3090R720141') and (order_stat_uniq_id &lt; 500)" 

Forum|alt.badge.img+9
  • Author
  • Sidekick (Customer)
  • 36 replies
  • September 2, 2024
Andrew D'Antonio wrote:

Try using the XML escape codes. &lt; for < and &gt; for >

SaaAvinak wrote:

Hello @csjohnstone ,

try using &lt; for the less-than

Hope that works. 

value="(serial_no = '3090R720141') and (order_stat_uniq_id &lt; 500)" 

Tried that. &gt; works. &lt; doesn't 🙃

 


Forum|alt.badge.img+9
  • Author
  • Sidekick (Customer)
  • 36 replies
  • September 2, 2024

🤔🤔🤔🤔🤔🤔


Forum|alt.badge.img+12
  • Superhero (Employee)
  • 114 replies
  • Answer
  • September 2, 2024

Hi Chris,

 

Try the below API

 

<root xmlns="http://astea.com.schema.bc.service_order">
  <session email="" alias="">
    <state bc_name="service_order">
      <action name="execquery">
        <attribute in_var="" out_var="" entity_name="order_locator" query_name="order_locator_scrl"
                   sort_column_direction="+" sort_column_alias="request_id"/>
        <attribute dtype="argument" name="where_cond"
                   value="(serial_no = '3090R720141') and (order_stat_uniq_id &amp;lt; 500)" operator="="/>
      </action>
    </state>
  </session>
</root>


Forum|alt.badge.img+9
  • Author
  • Sidekick (Customer)
  • 36 replies
  • September 2, 2024
Joshua Liem wrote:

Hi Chris,

 

Try the below API

 

<root xmlns="http://astea.com.schema.bc.service_order">
  <session email="" alias="">
    <state bc_name="service_order">
      <action name="execquery">
        <attribute in_var="" out_var="" entity_name="order_locator" query_name="order_locator_scrl"
                   sort_column_direction="+" sort_column_alias="request_id"/>
        <attribute dtype="argument" name="where_cond"
                   value="(serial_no = '3090R720141') and (order_stat_uniq_id &amp;lt; 500)" operator="="/>
      </action>
    </state>
  </session>
</root>

That worked! Thanks Joshua.


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