The following code shows how to use the Find(int) method to locate the instance in the collection using the Partition ID:

define variable policy as IPartitionPolicy no-undo. 
define variable detail as IPartitionPolicyDetail no-undo. 
           
assign
         policy = service:GetPartitionPolicy("OrderlineDatePolicy")
    detail = policy:Details:Find(23).