Plug-ins > Address Book Manipulator

Search results non-deterministic on first result?

(1/1)

john.christopher:
Maybe I'm missing something, but PCAB_OpenFirstRecord doesn't seem to behave as expected.  Calling it a second time seems to advance the cursor to the next record, while still returning the UID of the first record.  Calling PCAB_OpenNextRecord after calling PCAB_OpenFirstRecord twice returns the UID of the second record, but the properties retrieved are still from the first record.

I'm perplexed.

Code:

--- Code: ---List (
PCAB_Search ( "Group" ; "Name" ; "" ; "" ; "z" ; "NotEqual" ; "" );

PCAB_OpenFirstRecord;
PCAB_GetValueForProperty ( "Name" ; "" );

PCAB_OpenFirstRecord;
PCAB_GetValueForProperty ( "Name" ; "" );

PCAB_OpenNextRecord;
PCAB_GetValueForProperty ( "Name" ; "" );

PCAB_Open ( "647318B4-173E-4A8A-9E9E-7FC18BCBB5B9:ABGroup" );
PCAB_GetValueForProperty ( "Name" ; "" );
""
)
--- End code ---

Actual Result:

--- Code: ---10
647318B4-173E-4A8A-9E9E-7FC18BCBB5B9:ABGroup
c'ville
647318B4-173E-4A8A-9E9E-7FC18BCBB5B9:ABGroup
dc
3B3FFCEB-509E-49A1-AA3C-25730D38A1E4:ABGroup
c'ville
0
c'ville

--- End code ---

Expected result:

--- Code: ---10
647318B4-173E-4A8A-9E9E-7FC18BCBB5B9:ABGroup
c'ville
647318B4-173E-4A8A-9E9E-7FC18BCBB5B9:ABGroup
c'ville
3B3FFCEB-509E-49A1-AA3C-25730D38A1E4:ABGroup
dc
0
c'ville
--- End code ---

It appears to me that I can work around this by using the search ONLY to retrieve UIDs to then call PCAB_Open on each UID.

john.christopher:
To be clear, what I see happening here is that PCAB_OpenFirstRecord always returns the UID of the first record in the found set, but subsequent calls to PCAB_OpenFirstRecord actually advance the cursor to the next record, rather than returning the cursor to the first record.

Jerel Malong:
I tested your script steps and received the "expected results". (See Attached Screenshot) Are you still experiencing this issue?

Navigation

[0] Message Index

Go to full version