Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Resource getJournal: Difference between revisions

From Catglobe Wiki
Nguyentanphong (talk | contribs)
Tungocman (talk | contribs)
 
(10 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 ===
ResourceID: is a number. It is the resource id of questionnaire, report, task....etc.
<br>


=== Return type ===
<br>
An array of ResourceJournalEntry.
See [ResourceJournalEntry]for more info


<br>
=== Arguments  ===


=== &nbsp;Examples  ===
ResourceID: is a number. It is the resource id of resource


array journal=Resource_getJournal(37257114);
<br>


for(number i=0; i&lt;arrayCount(journal); i++)
=== Return type  ===


{
An array of [[ResourceJournalEntry class|ResourceJournalEntry objects]].
Also see [[Resource_addJournal|Resource_addJournal]] for more information about ResourceJournalEntry object.


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(journal[i].CommentType);
<br>
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(journal[i].Content);
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(journal[i].CreatedByUserResourceId);
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(journal[i].CreatedDate);
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(journal[i].ModifiedByUserResourceId);
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(journal[i].ModifiedDate);
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(journal[i].ObjectTypeName);
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;print(journal[i].TypeInformation);
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print("\n");
 
}
 
 
 
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;&nbsp;&nbsp; // Comment type
 
&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; 25455&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Create By User Resource Id
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2011-08-08 04:24:55&nbsp;&nbsp;// create date
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25455&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Create By User Resource Id
 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2011-08-08 04:25:54 // ModifiedDate


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ResourceJournalEntry // Object Type Name
=== Examples  ===


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TypeInformation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // TypeInformation  
<source lang="javascript">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
}</source>


__NOTOC__  
__NOTOC__  


[[Category:Resource_Functions]]
[[Category:Resource_Functions]]

Latest revision as of 03: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
}