Recording a macro didn’t really help as the mechanism the UI uses to identify each row is the PARMSEQ field, which is an incrementing value representing the row number of the table.
For an automated import this is quite brittle as an additional entry could potentially reorder the rows causing the incorrect row to be updated.
When viewing the table we found an integer value (PARMNBR) was being stored, which we could only assume was some sort of reference to the record.
The PARMNMBR would be fine to use as the key to update, but you would need to know it’s value and this is a little concealed, ideally we’re looking to use the description as the key to update these values.
Investigation 1 (Fail)
Hunting around the tables….no tables would be found with this info.
Investigation 2 (RVPSPY)
We opened our friend, RVSPY with nesting turned on and found the screen was calling CT0002.
This makes sense since all descriptions are stored in resource files, so the PARMNBR was actually the Resource ID.
To get the description we needed to using the RscGetString method to retrieve them (note that we’re querying the CT module and not the CP application.
|
1 |
mDBLinkCmpRW.Session.RscGetString("CT", CT.Fields("PARMNBR").Value) |