Query Update Entry operation

The Query Update Entry operation performs a query on a BMC Remedy Action Request (AR) System schema and then updates the specified fields with the designated values.


You can clear the following types of BMC Remedy AR System fields if and only if the Entry Mode of the field is set to optional in the application. You can specify an empty value, for example, <field name=IntegerField></field> or specify a "$NULL$" string in the adapter request.


  • Character ( Any field that accepts characters, like description, and so on)
  • Date/Time
  • Date
  • Time
  • Currency
  • Integer
  • Real
  • Decimal
  • Selection (List, radio button, or check box)


The following table describes the input elements for the Query Update Entry operation:


Input elements for the Query Update Entry operation


Element

Description

Required

<adapter name>

Specifies the name of the adapter in the adapter configuration that is used to execute the operation

Default Value: ARSAdapter

No

<schema name>

Specifies the BMC Remedy AR System schema which is updated

Yes

<id>

Specifies the ID of the record to be updated

Conditional; required if <query> is not specified

<values>

Specifies the fields and values for the entry to be queried

Yes

<field id>

Specifies the ID of the field to be updated

Conditional; required if <id> is not specified

<query>

Specifies the query to be executed on the schema

Conditional; required if <id> is not specified


Note

Before running the operation, ensure that you specify the value of the Action field in the Call Adapter Activity to query-update.

The following figure shows an XML sample of the input elements for the Query Update Entry operation:


XML sample of the input elements for the Query Update Entry operation


<remedy-action>
   <query><![CDATA['4'="CEO"]]></query>
   <schema>Alert Events</schema>
   <values>
        <field id="705">1</field>
   </values>
</remedy-action>


The following table describes the elements for the adapter response for Query Update Entry operation:


Adapter response elements for the Query Update Entry operation


Element

Description

<entries>

Contains the entry fields returned by the query

<metadata>

Contains the metadata from the request

<entry-count>

Contains the count of the number of records updated by the query


The following figure shows the XML sample of the adapter response for the Query Update Entry operation:


Sample adapter response for the Query Update Entry operation


<query-update-action-result>
   <entries>
     <metadata>
        <entry-count>8</entry-count>
     </metadata>
   </entries>
</query-update-action-result>


The following figure shows a sample adapter request for clearing a field using an "empty" field value:


Sample adapter request with an "empty" field value


<request-data>
      <remedy-action>
         <query>'1'="000000000000026"</query>
         <schema>TestClearSelectionFields</schema>
         <values>
            <field name="RealNumberField"></field>
            <field name="DateTimeField"></field>
            <field name="DateField"></field>
             <field name="TestRadio"></field>
            <field name="Time Field"></field>
            <field name="IntegerField"></field>
            <field name="CurrencyField"></field>
            <field name="Check Box Field"></field>
            <field name="DecimalNumberField"></field>
            <field name="Short Description">Passing Empty String</field>
            <field name="TestCharacter"></field>
         </values>
      </remedy-action>
</request-data>


The following figure shows a sample adapter request for clearing a field using a "$NULL$" string:


Sample adapter request with an with a "$NULL$" string


<request-data>
      <remedy-action>
         <query>'1'="000000000000026"</query>
         <schema>TestClearSelectionFields</schema>
         <values>
            <field name="RealNumberField">$NULL$</field>
            <field name="DateTimeField">$NULL$</field>
            <field name="DateField">$NULL$</field>
            <field name="TestRadio">$NULL$</field>
            <field name="Time Field">$NULL$</field>
            <field name="IntegerField">$NULL$</field>
            <field name="CurrencyField">$NULL$</field>
            <field name="Check Box Field">$NULL$</field>
            <field name="DecimalNumberField">$NULL$</field>
            <field name="Short Description">Passing NULL String</field>
         </values>
      </remedy-action>
</request-data>
Was this page helpful? Yes No Submitting... Thank you

Comments