Does anynody know if it is possible to merge 2 data sets ?

hello,
let's say we have two XMLDataSet ds1 and ds2 of the same
nature (same data set path), both were loaded, is it possible to
add the data of ds2 to ds1 and have the region updated?
thank you.

It is possible, though you currently have to write code to do
it. I'll file a bug against myself to add some data set APIs to
make this much easier. In the mean time, here's an example of how
you can do it. Hopefully this code doesn't get munged by the forum
server.
--== Kin ==--
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Data Set Merging Example</title>
<script language="JavaScript" type="text/javascript"
src="../Spry_P1_4_12-14/includes/xpath.js"></script>
<script language="JavaScript" type="text/javascript"
src="../Spry_P1_4_12-14/includes/SpryData.js"></script>
<script language="JavaScript" type="text/javascript">
// Create a generic data set that will hold all of the data.
var dsAllData = new Spry.Data.DataSet();
// Create a data set that will go out and fetch new data.
var dsDataLoader = new
Spry.Data.XMLDataSet("../Spry_P1_4_12-14/data/employees-01.xml",
"/employees/employee");
// Add an observer to the data set that fetches our data.
// Whenever it loads new data, we want to append it to
// dsAllData.
dsDataLoader.addObserver(function(notificationType, notifier,
data) {
if (notificationType != "onPostLoad")
return;
if (!dsAllData.data)
dsAllData.data = [];
dsAllData.dataHash = {};
// Get the rows from the loader data set.
var newRows = dsDataLoader.getData();
var newRowCount = newRows.length;
var nextID = dsAllData.getRowCount();
// Now run through all of the rows that were fetched
// and update their ds_RowID so that they are unique
// when we insert them into dsAllData. Note we also
// have to update the hash table in dsAllData.
for (var i = 0; i < newRowCount; i++)
var row = newRows
row.ds_RowID = nextID++;
dsAllData.dataHash[nextID] = row;
dsAllData.data.push(row);
// Now call loadData() so we can broadcast to any
// observers of dsAllData that its data has changed.
dsAllData.loadData();
// Since none of the regions in this page depend on
dsDataLoader,
// we need to manually kick off a load.
dsDataLoader.loadData();
</script>
</head>
<body>
<input type="button" value="Append"
onclick="dsDataLoader.loadData();" />
<div spry:region="dsAllData">
<table border="1">
<tr>
<th>ds_RowID</th>
<th>Name</th>
</tr>
<tr spry:repeat="dsAllData">
<td>{ds_RowID}</td>
<td>{firstname} {lastname}</td>
</tr>
</table>
</div>
</body>
</html>

Similar Messages

Maybe you are looking for

  • Custom field added by AET is not editable - not added to BOL structure

    Hi , We had created a new field using AET in Products Assignment Block of Campaigns as a line item.This is a drop down field. But in WEB UI,this field is being displayed as non-editable dropdown. In AET, we opted Business Object as MKT_CPG and subobj

  • An exception occurred during the call of a business method

    An unexpected exception occurred during the call of a business method...Im calling the business object thru the business Delegate.Im calling the business method with an argument as hash table .. And Im using Oracle 9i application server.. Hash table

  • My first gen Ipod went in the wash and now I cannot get wifi on it.

    Well my first generation ipod touch accidently went in the wash, and now when its working again I cannot get any wifi on it. I have tried reset the network settings and the ipod my still no luck.

  • Source system change urgent

    Hi, I have my BW dev cltn connect to source system 630 ..now the client 630 has been dropped and it has to be connected to 650...what sholud be my steps...i ahve seen BDLS transaction but can any 1 who has done it b4 guide me. Thanks Prashant

  • Util_File package with multiple users

    I am using util_file package to spool data into file . I have two users with different data . I have given access to both the users to execute util_file package . Now how does my stored procedure knows which user's data to take . Thanks,