RE:[peopletools-l] Copy Data to Derived Record

Reply from Howler_Fish on Aug 14 at 3:40 AM
So does PHYSICAL_RECORD have the same fields as WORK_RECORD ?

ie

SELECT * FROM PSRECFIELD A WHERE A.RECNAME = [WORK_RECORD]
AND EXISTS (SELECT 1 FROM PSRECFIELD B WHERE B.RECNAME = [PHYSICAL_RECORD] AND B.FIELDNAME = A.FIELDNAME)

returns all the fields that you are expecting to see on your gird..

rs2 is a RAM only rowset (CreateRowset). you need some method to get it into the buffer.

Now a work record cannot be the primary record for a scroll so you need to identify that record (lets pretend it is called SCROLL_REC).


I think your code should

Local rowset &rs1, &rs2;

&rs1 = CreateRowset(Record.Physical_Record);
&rs1.fill("where criteria1=:1 and criteria2=:2 and criteria3=:3", &val1, &val2, &val3);

&rs2 = GetLevel0().GetRow(1).GetRowset(Sroll.SCROLL_REC);
&rs2.Flush();

local number &nbrLoop;
local record &rec1, &rec2;

For &nbrLoop = 1 to &rs1.ActiveRowCount

&rec1 = &rs1.GetRow(&nbrLoop).GetRecord(Record.PHYS ICAL_RECORD);
/* Note this assumes that SCROLL_REC is not effdt */
&rs2.InserRow(1);
&rec2 = &rs2.GetRow(2).GetRecord(Record.WORK_RECORD);
&rec1.CopyFieldsTo(&rec2);
End-For;
&rs2.DeleteRow(1);

---------------Original Message---------------
From: TallyAJ
Sent: Monday, August 06, 2012 9:22 AM
Subject: Copy Data to Derived Record

I am trying to copy data from a scroll to a work/dervied record, but only newly inserted row. I can copy that to a record,but same Peoplcode is not working while copying data to work record. I am using CopyFieldsTo function to copy the data.Please suggest what other fuction can be used to copy data to work record?

 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2012 Toolbox.com and message author.
Toolbox.com 4343 N. Scottsdale Road Suite 280, Scottsdale, AZ 85251
Howler_Fish  

achievements
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Toolbox.com for iPhone & Android: Ask Questions & Get Answers Anywhere. Download the Free App

_.____.__

No comments:

Post a Comment