You can save ChoicesArray to the Form object with OB SET 
ARRAY(Form;"myarr";ChoicesArray).
http://doc.4d.com/4Dv17/4D/17/OB-SET-ARRAY.301-3730702.en.html

Also 'JSON Stringify array' will produce a string that can be reconstituted 
with JSON PARSE ARRAY.
  FORM.myarr:=$stringifiedArray
http://doc.4d.com/4Dv17/4D/17/JSON-PARSE-ARRAY.301-3730390.en.html

Keith - CDI

> On Oct 2, 2018, at 2:42 PM, Chris Belanger via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I am trying to make a ComboBox object that is local to the Form. Hence I need 
> the Array to be a Form. object
> 
> ARRAY TEXT(Form.ChoicesArray;0) does not work;
> 
> Trying to get the data into a COLLECTION and then use COLLECTION TO ARRAY 
> (which should define the array easily) does not work:
> 
> Form.col_UnitTypes:=ds.Unit_Type.all().orderBy("Name 
> asc").toCollection("Name";dk with primary key)           
> COLLECTION TO ARRAY(Form.col_UnitTypes;Form.box_Type_Unit;"Name")             
> 
> does not work ("4D was expecting a Variable" error).
> 
> 
> Is there now way to set up an ARRAY for Form.Array usage?
> 
> Thanks for any observations,
> 
> Chris
> 
> 
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to