Question

I am trying to load some data into a custom table PeopleSoft using the delivered ExceltoCI utilty. I have a record with a single key -EMPLID; we are expecting only one row per employee, not effective dated or anything like that. In addition to EMPLID, I have about 9 numeric fields. The upload process appears to work - the status for each row of data is the green OK, but with certain rows of data, when I check online or in my SQL tool, the data is not there. This occurs when all of the 9 numeric fields in the data entry tab of the spreadsheet are set to 0. All other rows load ok. I am able to enter the data containig all zeros online. I have noticed that if I set the default value of one of the numeric fields to 1, everything loads (but not if I set it to 0) through the utility.

Thanks in advance!

Was it helpful?

Solution

Here's what I wound up doing: On one of the numeric fields I placed some PeopleCode in the RowInit event:

If None(MARKET_PAY.MARKET_LOW) Then MARKET_PAY.MARKET_LOW = 1; MARKET_PAY.MARKET_LOW = 0; End-If;

It accomplishes what I'm after but feels like a kludge - would be grateful if someone could provide a more elegant or "proper" solution.

OTHER TIPS

For historical purposes, PeopleSoft treats null values in a peculiar manner. Null numeric values are stored as zeroes, and null text values are stored as single blanks (" "). Null dates/times/datetimes and long character fields are actual database NULLs.

You're describing a sibling table with key fields plus only numeric fields. However, PeopleTools will technically treat this as a child table, and child tables are not inserted into when all non-key fields are "null". Your kludge takes care of the requirement to have the rows physically inserted when all values are zero, but I can think of two other things you could do:

  1. If you won't be using the Excel-to-CI regularly (i.e., it's just for initial or infrequent data load), you could code a simple statement to INSERT into the table an all-zeroes row for each EMPLID not already present in the table. (If the table is not required in to-the-second real-time use, you could set up this INSERT as a database job to run nightly, for example.)

  2. If feasible, relatively limited in scope, and not prohibitive from an effort or performance perspective, you could change any joins that involve this table into outer joins, coalescing the potentially NULL values to zeroes.

There is a third option: to add a field to the Record that you know will always have a value. For example, you could add a last modified timestamp/user pair. However, this is a data model design choice that only makes sense if the added field is something you really need to track. In other words, it's just as kludgy as your current solution, but could add some value to the context of the data.

Put ,0 in the exceltoci field. it will load and save. it is the excel spreadsheet and the vba code behind the scenes that causes this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top