File Layout

CSV to File lay out issue..

If we want to fetch particular field from csv file to PS table using Array Array?

Like In CSV filed, columns are in one order and in PS Table fields are in one order??

Any leads will be appreciated...

thank you,

AE PeopleCode FileLayout

I am using the automatic AE Peoplecode generated with File Layout. I need to add a function to check the Date field because the layout is expecting MM/DD/YYYY but sometimes, the date is M/D/YYYY.

In the ImportSegment fuction, after statement "If (EditRecord(&REC2)) Then"

I added the following:

Evaluate &REC2.GetField(&I).Type
When = "DATE"
If &REC2.GetField(&I).Name = "COVERAGE_BEGIN_DT" Then
MessageBox(0, "", 0, 0, " **** Field Type = " | &REC2.GetField(&I).Name | "**** ");

How do I exclude the header row when reading in inbound file

I have inbound csv file using filelayout but without the AE auto generated code. How do I skip the header row?

&INPUT = GetFile(&FILE_DIRECTORY | &FileName, "R", %FilePath_Absolute);
/*check if file is open*/
If &INPUT.IsOpen Then
If &INPUT.SetFileLayout(FileLayout.INBOUND_FL) Then
/*read line into &STRING*/
While &INPUT.ReadLine(&STRING);
&ARRAY = Split(&STRING, ",");
&i = 0;
For &i = 1 To &ARRAY.Len
&REC.GetField(&i).Value = RTrim(LTrim(&ARRAY [&i]));

File layout


I have to import data from a csv file which contains the header as a date. And the body contains the details of the transactions.The footer contains the count of the number of rows processed in transaction. I have to load the header in Table 1 and validate whether the date matches with the system date .And the transactions data in a separate table 2 and the footer into the table 3 and have to validate whether the total count of the transactions matches with the footer . Please help me out.

Read XML data into PS record using File Layout/App Engine Peoplecode


I am reading an XML file using a file layout

I need to insert the data coming in this file into a PS staging record, the tag structure in the XML file has been mapped to the file layout which uses this staging record. However, I fail to understand how to proceed for fetching the data and inserting using App Engine peoplecode. In case of a CSV file, we split the data and pass it into an array for processing, but I am not really sure on what needs to be done on this case, any inputs on this would be of great help