Siebel Portal Framework Guide > Delivering Content to External Web Applications > Common Operations >

Querying Items


To successfully perform a query, you must first navigate to a screen that allows queries. You must then send two separate requests to the SWE XML application. The first request executes the Create New Query action, and the second executes the Execute Query action.

NewQuery

<?xml version="1.0" encoding="UTF-8"?>

<EXEC PATH="/callcenter/start.swe">

<CMD NAME="SWECmd" VALUE="InvokeMethod">

<ARG NAME="SWEMethod">NewQuery</ARG>

<ARG NAME="SWEView">view name</ARG>

<ARG NAME="SWEApplet">applet name</ARG>

<ARG NAME="SWESetMarkup">XML</ARG>

<ARG NAME="SWEDataOnly">TRUE</ARG>

<ARG NAME="SWESetNoTemp">TRUE</ARG>

</CMD>

</EXEC>

ExecuteQuery

In the ExecuteQuery command block, you must include an <ARG> tag. The tag must include a NAME parameter to identify the column (the field that you want to search), and a value to indicate the search criteria.

<?xml version="1.0" encoding="UTF-8"?>

<EXEC PATH="/callcenter/start.swe"

<CMD NAME="SWECmd" VALUE="InvokeMethod">

<ARG NAME="SWEMethod">ExecuteQuery</ARG>

<ARG NAME="SWEView">view name</ARG>

<ARG NAME="SWEApplet">applet name</ARG>

<ARG NAME="column name">search criteria</ARG>

<ARG NAME="SWESetMarkup">XML</ARG>

<ARG NAME="SWEDataOnly">TRUE</ARG>

<ARG NAME="SWESetNoTemp">TRUE</ARG>

</CMD>

</EXEC>

The auction items that match the query are returned in the response. The returned payload contains complete lot names and IDs for each item.

TIP:   Each row (or record) within a response contains an ID that uniquely identifies it. You can use a row ID as a parameter in a query to identify a record so that you can modify or delete it.

Adding Records

To successfully add a record to a list, you must first navigate to a screen that allows records to be inserted. Then, you must send two separate requests to the SWE XML application. The first request executes the New Record action. The second executes the WriteRecord action.

NewRecord

In a NewRecord command block, you use <ARG> tags to indicate the view and applet to which you want to add the new record.

<?xml version="1.0" encoding="UTF-8"?>

<EXEC PATH="/callcenter/start.swe">

<CMD NAME="SWECmd" VALUE="InvokeMethod">

<ARG NAME="SWEMethod">NewRecord</ARG>

<ARG NAME="SWEView">view name</ARG>

<ARG NAME="SWEApplet">applet name</ARG><

ARG NAME="SWESetMarkup">XML</ARG>

<ARG NAME="SWEDataOnly">TRUE</ARG>

<ARG NAME="SWESetNoTemp">TRUE</ARG>

</CMD>

</EXEC>

WriteRecord

In a WriteRecord command block, you must include an <ARG> tag for the row ID of the record (SWERowID) and another <ARG> tag to indicate that the row ID is required for the operation (SWEReqRowId).

<?xml version="1.0" encoding="UTF-8"?>

<EXEC PATH="/callcenter/start.swe">

<CMD NAME="SWECmd" VALUE="InvokeMethod">

<ARG NAME="SWEMethod">WriteRecord</ARG>

<ARG NAME="SWEReqRowId">1</ARG>

<ARG NAME="SWEView">view name</ARG>

<ARG NAME="SWERowId">row id of record to be saved</ARG>

<ARG NAME="SWEApplet">applet name</ARG>

<ARG NAME="SWESetMarkup">XML</ARG>

<ARG NAME="SWEDataOnly">TRUE</ARG>

<ARG NAME="SWESetNoTemp">TRUE</ARG>

</CMD>

</EXEC>

Siebel Portal Framework Guide Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.