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)
Nguyentanphong (talk | contribs)
No edit summary
Line 1: Line 1:
= Resource_getJournal  =
= Resource_getJournal  =


Get journal information from a resource.
Get journal information from a resource.  


=== Syntax ===
=== Syntax ===


Resource_getJournal(ResourceID)  
Resource_getJournal(ResourceID) <br>  
<br>


=== Arguments ===
=== Arguments ===
ResourceID: is a number. It is the resource id of questionnaire, report, task....etc.
<br>


=== Return type ===
ResourceID: is a number. It is the resource id of questionnaire, report, task....etc. <br>
An array of ResourceJournalEntry.
See [ResourceJournalEntry]for more info


<br>
=== Return type  ===


=== &nbsp;Examples  ===
An array of ResourceJournalEntry.


array journal=Resource_getJournal(37257114);
See [http://wiki.catglobe.com/index.php/ResourceJournalEntry_class [ResourceJournalEntry]] for more inf.
 
<br>
 
=== Examples  ===
 
array journal=Resource_getJournal(37257114);  


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


{
{  


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(journal[i].CommentType);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(journal[i].CommentType);  
Line 35: Line 35:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(journal[i].CreatedDate);  
&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].ModifiedByUserResourceId);  


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(journal[i].ModifiedDate);  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(journal[i].ModifiedDate);  
Line 41: Line 41:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print(journal[i].ObjectTypeName);  
&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;&nbsp;print(journal[i].TypeInformation);  


&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print("\n");  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print("\n");  
Line 47: Line 47:
}  
}  


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


Result is:
&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; 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; 25455&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; 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; 25455&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;&nbsp; 2011-08-08 04:25:54&nbsp;&nbsp; // ModifiedDate  


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


&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  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TypeInformation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // TypeInformation  


__NOTOC__  
__NOTOC__  


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

Revision as of 10:18, 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 inf.


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