Hi Casey,
The objects structure should return as a structure keyed or ordered on the UUID of the 
objects.  This type of structure is described as an associative array.  Using cfa_dump 
or cfdump on the return structure makes this apparent.  Looping through this structure 
to print out artifact object labels might make it appear random.  But it is not.

If you want to process the returned structure based on the label order you should 
create a list of the objectids sorted by the objects' label order.  Then process in a 
loop using the list.  Here is similar logic doing a cogetMultiple on a list of 
objectids.  Then creating a list of ids based on the object's label.  Then dumping the 
objects in ascending order of the labels.

You will clearly need to put in more logic to get process based on your artifact 
labels.  I am also not sure just what type of order you are looking to output your 
task instances in.  But the basic logic should apply.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
        <title>cfa_contentObjectMultiple</title>
</head>

<body>

<cfa_contentobjectgetmultiple
      datasource="#request.cfa.objectstore.dsn#"
          
lobjectids="2635EC3B-65EE-11D3-AD4C0060B0EB2994,258096F4-70FF-11D3-AD4D0060B0EB2994,70E7E099-A67E-11D2-B3AC00C04FA35A23"
   
      r_stobjects="r_stObjs">

<cfset lLabels = "">
          
<cfloop collection="#r_stObjs#"
        item="id">
        <cfset lLabels = ListAppend(lLabels, r_stObjs[id].label)>
</cfloop>          

<cfset lsorted = ListSort(lLabels, "Textnocase")>

labels sorted: <cfdump var="#lsorted#"><br>
          
orig list: <cfdump var="#lLabels#">       <br>

<cfloop index="lbl"
        list="#lsorted#">
        <cfloop collection="#r_stObjs#"
        item="id">
                <cfif CompareNoCase(r_stObjs[id].label, lbl) EQ 0>
                        <cfdump var="#r_stObjs[id]#"><br><br><br> 
                </cfif>
        </cfloop>          
</cfloop>
</body>
</html>

Regards,

Ken Smith 
Senior Engineer, Certified ColdFusion 5 Developer
ColdFusion/Spectra Product Support




-----Original Message-----
From: Cojocaru, Casey S., A&M IRM, AFIS-HQ
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 04, 2002 9:36 AM
To: Spectra-Talk
Subject: cfa_contentobjectgetmultiple


Greetings,

        For all the times I have had issues with this tag.  In my
application, I need to sort the list of available tasks for a given user
according to label of the artifact object of the parent workflow.  I am able
to do this via some looping, and the structSort function.  When I pass my
sorted list of objectids into cfa_contentobjectgetmultiple, I get back a
structure of tasks that are in a random order.  Any insight will be greatly
appreciated.

                Casey

______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to