Skip to main content

Does IFS have the ability to have a function that retrieves a multi-record dataset be stored in a virtual that then is displayed in a list on a page?  I am following the documentation, and the function doesn’t seem to return anything and I feel like I'm missing something.  the query is using a view that does not have an entity and the purpose of this is to only list the results and allow the users to drill into the detail of the records if need be.

 

Client Page:  

list xxxList using xxxFunction(parameter);

 

List:

list xxxList using xxxVirutal{

 field names…

}

 

Projection: 

function xxxFunction List<Entity(xxxVirual)> {
   parameter Contract Text;
}

 

In the .plsvc file this is what the function is according to the documention

 

FUNCTION xxxFunction_(
   parameter_ IN VARCHAR2) RETURN Objid_Arr
IS
   base_collection_ Objid_Arr := Objid_Arr(); 
   CURSOR Get IS
      SELECT 
         *
      FROM tableName
      WHERE FieldName = parameter_
BEGIN
    FOR rec_ IN Get LOOP
      base_collection_.extend;
      base_collection_(base_collection_.count) := rec_.objid;
   END LOOP;
   RETURN base_collection_;
END xxxFunction_;

Be the first to reply!

Reply