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)
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{HelpFiles}}
 
= Resource_getJournal  =
 
= Resource_getJournal  =
  
Get journal information from a resource.
+
Get journal information of a specific resource.  
  
=== Syntax ===
+
<br>
 +
 
 +
=== Syntax ===
  
 
Resource_getJournal(ResourceID)  
 
Resource_getJournal(ResourceID)  
<br>
 
  
=== Arguments ===
+
<br>
ResourceID: is a number. It is the resource id of questionnaire, report, task....etc.
+
 
<br>
+
=== Arguments ===
 +
 
 +
ResourceID: is a number. It is the resource id of resource
 +
 
 +
<br>  
 +
 
 +
=== Return type  ===
  
=== Return type ===
+
An array of [[ResourceJournalEntry class|ResourceJournalEntry objects]].
An array of ResourceJournalEntry.
+
Also see [[Resource_addJournal|Resource_addJournal]] for more information about ResourceJournalEntry object.
 
See [ResourceJournalEntry]for more info
 
  
 
<br>
 
<br>
  
=== Examples ===  
+
=== Examples ===
  
array journal=Resource_getJournal(37257114);//37278203 //37246024
+
<source lang="javascript">array journal=Resource_getJournal(37257114);  
for(number i=0; i<arrayCount(journal); i++)
+
for(number i=0; i<arrayCount(journal); i++)  
{
+
{  
  print(journal[i].CommentType);
+
print(journal[i].CommentType); // Description
  print(journal[i].Content);
+
print(journal[i].Content); // phong questionnaire 2
  print(journal[i].CreatedByUserResourceId);
+
print(journal[i].CreatedByUserResourceId); //25455
  print(journal[i].CreatedDate);
+
print(journal[i].CreatedDate); //  2011-08-08 04:24:55
  print(journal[i].ModifiedByUserResourceId);
+
print(journal[i].ModifiedByUserResourceId); // 36459
  print(journal[i].ModifiedDate);  
+
print(journal[i].ModifiedDate); // 2011-08-08 04:25:54
  print(journal[i].ObjectTypeName);
+
print(journal[i].ObjectTypeName); // ResourceJournalEntry
  print(journal[i].TypeInformation);
+
print(journal[i].TypeInformation); // TypeInformation
  print("\n");
+
}</source>
}  
 
  
Result is:
+
__NOTOC__
          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
 
  
 
[[Category:Resource_Functions]]
 
[[Category:Resource_Functions]]
__NOTOC__
 

Latest revision as of 05:50, 11 September 2012

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. Also see Resource_addJournal for more information about ResourceJournalEntry object.


Examples

array journal=Resource_getJournal(37257114); 
for(number i=0; i<arrayCount(journal); i++) 
{ 
	print(journal[i].CommentType); // Description
	print(journal[i].Content); // phong questionnaire 2
	print(journal[i].CreatedByUserResourceId); //25455
	print(journal[i].CreatedDate); //  2011-08-08 04:24:55
	print(journal[i].ModifiedByUserResourceId); // 36459
	print(journal[i].ModifiedDate); // 2011-08-08 04:25:54
	print(journal[i].ObjectTypeName);  // ResourceJournalEntry
	print(journal[i].TypeInformation); // TypeInformation
}