Difference between revisions of "Resource getJournal"

From Catglobe Wiki
Jump to: navigation, search
(Created page with "= Resource_getJournal = Get journal information from a resource. === Syntax === Resource_getJournal(ResourceID) <br> === Arguments === ResourceID: is a number. It is the re...")
 
(Examples)
Line 19: Line 19:
 
<br>
 
<br>
  
=== Examples ===  
+
=== Examples ===
 +
 
 +
array journal=Resource_getJournal(37257114
 +
for(number i=0; i&lt;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");
  
array journal=Resource_getJournal(37257114);//37278203 //37246024
 
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:
+
Result is:  
 +
 
 
           Description          // Comment type
 
           Description          // Comment type
          phong questionnaire 2 // Content
+
        phong questionnaire 2 // Content
          25455                // Create By User Resource Id
+
        25455                // Create By User Resource Id
          2011-08-08 04:24:55  // create date
+
        2011-08-08 04:24:55  // create date
          25455                // Create By User Resource Id
+
        25455                // Create By User Resource Id
          2011-08-08 04:25:54  // ModifiedDate
+
        2011-08-08 04:25:54  // ModifiedDate
          ResourceJournalEntry  // Object Type Name
+
        ResourceJournalEntry  // Object Type Name
          TypeInformation      // TypeInformation
+
        TypeInformation      // TypeInformation
 +
 
 +
__NOTOC__
  
 
[[Category:Resource_Functions]]
 
[[Category:Resource_Functions]]
__NOTOC__
 

Revision as of 11:42, 10 November 2011

Resource_getJournal

Get journal information from a resource.

Syntax

Resource_getJournal(ResourceID)

Arguments

ResourceID: is a number. It is the resource id of questionnaire, report, task....etc.

Return type

An array of ResourceJournalEntry.

See [ResourceJournalEntry]for more info


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           // Comment type
       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