AppendMatrixFieldToKeyName
Paul Timms
3-14-17
In some datadefs, AppendMatrixFieldToKeyName is used to allow searching for a record containing a particular matrix field, without having to loop through the rows. For example, POVc has this index:


SubsetKeyBegin2(ActArtCodeOSFlag);

StoreInBaseKey;
AppendMatrixFieldToKeyName(ArtCode,0);
KeySegment(SerNr);


I have written a procedure which loops through POVc looking for those containing a specific item, but it returns no results even though I have a purchase order with the specified item. Below is the code I am using. Any idea what might be wrong?

TrHs = true;
index = "ActArtCodeOSFlag:" & INr.Code;
ResetLoop(POr);
while (LoopKey(index,POr,1,TrHs)) begin
if (TrHs) then begin

trace(POr.SerNr,POr.TransDate);


Thanks

Paul
Leave Comment
You can subscribe to notifications for this post by selecting the 'star' icon on the top right corner of the post.
Latest Posts
Lilian Wanyoike
Version 2023-12-03 Build : 85553039...
13:08 26 Feb 2025
Aldevinas Katkus
RecordAddBegin(UserVc,"UserVc_fuel"); RecordField(EmployeeCode, M4Code, 10,0); KeyBegin(EmployeeCode); KeySegment(EmployeeCode); KeySegment(Code); EndRecordAdd; ...
12:32 26 Feb 2025