Difference between revisions of "Resource getJournal"

From Catglobe Wiki
Jump to: navigation, search
(Return type)
Line 1: Line 1:
 
= Resource_getJournal  =
 
= Resource_getJournal  =
  
Get journal information from a resource.  
+
Get journal information of a specific resource.  
  
 
=== Syntax  ===
 
=== Syntax  ===
Line 9: Line 9:
 
=== Arguments  ===
 
=== Arguments  ===
  
ResourceID: is a number. It is the resource id of questionnaire, report, task....etc. <br>  
+
ResourceID: is a number. It is the resource id of resource<br>  
  
 
=== Return type  ===
 
=== Return type  ===
  
An array of ResourceJournalEntry.  
+
An array of ResourceJournalEntry objects.  
  
 
See [http://wiki.catglobe.com/index.php/ResourceJournalEntry_class [ResourceJournalEntry]] for more information.  
 
See [http://wiki.catglobe.com/index.php/ResourceJournalEntry_class [ResourceJournalEntry]] for more information.  
  
<br>
+
<br>  
  
 
=== Examples  ===
 
=== Examples  ===
Line 27: Line 27:
 
{  
 
{  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(journal[i].CommentType);  
+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(journal[i].CommentType);&nbsp; <br>
  
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(journal[i].Content);  
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(journal[i].Content);  
Line 49: Line 49:
 
Result is:  
 
Result is:  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Comment type
+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
  
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; phong questionnaire 2 // Content  
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; phong questionnaire 2 // Content  

Revision as of 11:38, 11 November 2011

Resource_getJournal

Get journal information of a specific resource.

Syntax

Resource_getJournal(ResourceID)

Arguments

ResourceID: is a number. It is the resource id of resource

Return type

An array of ResourceJournalEntry objects.

See [ResourceJournalEntry] for more information.


Examples

array journal=Resource_getJournal(37257114);

for(number i=0; i<arrayCount(journal); i++)

{

         print(journal[i].CommentType); 

         print(journal[i].Content);

         print(journal[i].CreatedByUserResourceId);

         print(journal[i].CreatedDate);

         print(journal[i].ModifiedByUserResourceId);

         print(journal[i].ModifiedDate);

         print(journal[i].ObjectTypeName);

         print(journal[i].TypeInformation);

         print("\n");

}

Result is:

                Description                

                phong questionnaire 2 // Content

                25455                        // Create By User Resource Id

                2011-08-08 04:24:55   // create date

                25455                       // Create By User Resource Id

                2011-08-08 04:25:54   // ModifiedDate

               ResourceJournalEntry // Object Type Name

               TypeInformation          // TypeInformation