Difference between revisions of "Resource searchByChildResourceIdAndResourceType"

From Catglobe Wiki
Jump to: navigation, search
(Example)
(Resource_searchByChildResourceIdAndResourceType)
Line 2: Line 2:
 
= Resource_searchByChildResourceIdAndResourceType =
 
= Resource_searchByChildResourceIdAndResourceType =
  
 
+
Search all parents of resources base on a specific resource type
  
 
== Syntax ==
 
== Syntax ==
Line 15: Line 15:
  
 
== Return type ==
 
== Return type ==
Dictionary
+
Dictionary. Dictionary of the resource ids (possible missing entries with no matching parents) and a list of parents of the given resource id that has the given resource type, same format returned in the list as Resource_searchByName
  
 
== Example ==
 
== Example ==

Revision as of 10:28, 16 May 2018

Resource_searchByChildResourceIdAndResourceType

Search all parents of resources base on a specific resource type

Syntax

Resource_searchByChildResourceIdAndResourceType(array resourceRId, number resourceType);

Arguments

array resourceRId

number resourceType

Return type

Dictionary. Dictionary of the resource ids (possible missing entries with no matching parents) and a list of parents of the given resource id that has the given resource type, same format returned in the list as Resource_searchByName

Example

array resourceId={15600608, 15601655, 15601668};
number resourceType = 6;
Dictionary result = Resource_searchByChildResourceIdAndResourceType( resourceId, resourceType);
print(result);
/*
{
"15600608": {{10,15559701,BUS 2017,6,75733,2071},{10,75733,Survey,6,75732,2071},{10,75732,Omnibus,6,6376,2071}}, 
"15601655": {}, 
"15601668": {{10,15588464,Qnaire Send Email,6,15563252,2071},{10,15563252,CG1876vox,6,2126,2071}}
}
*/