PropertyArray property: CONQRSMGR class

Description

Use this property to set or return an array of CONQRSPROPERTY objects (properties) for the connected query. If no properties exist, this array returns the default set of properties.

This property is read/write.

The following read-only properties of the CONQRSMGR class are dynamically synchronized whenever the PropertyArray property is set or returned:

  • ExecutionLog

  • IgnoreRelFldOutput

  • IsDebugMode

  • ShowFormattedXML

Example

The first example retrieves a set of properties from the database and populates the page grid using the Page Activate event:

import PT_CONQRS:CONQRSMGR;
import PT_CONQRS:CONQRSPROPERTY;

Component PT_CONQRS:CONQRSMGR &cConQrsInst;

Local array of PT_CONQRS:CONQRSPROPERTY &propArr;
Local Rowset &rsProp;
Local number &i, &j;

&propArr = &cConQrsInst.PropertyArray;
If &propArr.Len = 0 Then
   Return;
End-If;
Local Record &recProp, &recWrk;
&rsProp = GetLevel0()(1).GetRowset(Scroll.PSCONQRSPROP);
&rsProp.Flush();
For &i = 1 To &propArr.Len
   If &i > 1 Then
      &rsProp.InsertRow(&i - 1);
   End-If;
   &recProp = &rsProp(&i).PSCONQRSPROP;
   &recProp.PROPVALUEOPTION.ClearDropDownList();
   For &j = 1 To &propArr [&i].PROPVALUEARRAY.Len
      &recProp.PROPVALUEOPTION.AddDropDownItem(&propArr [&i].PROPVALUEARRAY [&j],⇒
 &propArr [&i].PROPVALUEARRAYDESC [&j]);
   End-For;
   &recProp.PROPNAME.Value = &propArr [&i].PROPNAME;
   &recProp.PROPVALUEOPTION.Value = &propArr [&i].PROPVALUE;
   &recProp.OPRID.Value = &cConQrsInst.OprID;
   &recProp.CONQRSNAME.Value = &cConQrsInst.Name;
   &recWrk = &rsProp(&i).PSCONQRS_WRK;
   &recWrk.PROPVALUEOPTION.Value = &propArr [&i].PROPDEFAULT;
End-For;

The second example populates a property array from a page grid. This program is executed when a user hits the OK button on a secondary page, PSCONQRSPROPS:

import PT_CONQRS:CONQRSMGR;
import PT_CONQRS:CONQRSPROPERTY;

Component PT_CONQRS:CONQRSMGR &cConQrsInst;

If %Page = Page.PSCONQRSPROPS Then
   Local array of PT_CONQRS:CONQRSPROPERTY &propArr;
   Local Rowset &rsProp;
   Local number &i;
   Local Record &recProp, &recWrk;

   /* Get the property array from the database.            */
   &propArr = &cConQrsInst.PropertyArray;
   If &propArr.Len = 0 Then
      Return;
   End-If;
   &rsProp = GetLevel0()(1).GetRowset(Scroll.PSCONQRSPROP);
   If &propArr.Len <> &rsProp.ActiveRowCount Then
      Return;
   End-If;
   For &i = 1 To &rsProp.ActiveRowCount
      &recProp = &rsProp(&i).PSCONQRSPROP;
      &recWrk = &rsProp(&i).PSCONQRS_WRK;
      If None(&recProp.PROPNAME.Value) Then
         &recProp.PROPNAME.Value = &recWrk.PROPVALUEOPTION.Value;
      End-If;
      &propArr [&i].PROPNAME = &recProp.PROPNAME.Value;
      &propArr [&i].PROPVALUE = &recProp.PROPVALUEOPTION.Value;
      &propArr [&i].PROPDEFAULT = &recWrk.PROPVALUEOPTION.Value;
   End-For;

   /* Return the modified property array to the database.  */
   &cConQrsInst.PropertyArray = &propArr;
End-If;