Chris, As you found arrays are not supported for use with Form. Objects like a combo box are aren't that hard to do but until they support a collection as the data source you have to manage them in classic 4D fashion. Which means you can shuffle an array around using OB SET/GET ARRAY and some containing object. You don't get the nifty feature of the combo box updating the values in Form, of course.
If the combo list is static you can put those values in a hard coded list or simply list them in the combo object. If they are dynamically built On Load you can just assign the array to the combo object. If the list is built before the form is displayed then you could put it in the data object passed to the form when it's opened and becomes Form. I like to have the combo box code fire on Data Change and at that point write the relevant value (Self->{0}) to my data object in Form. On Tue, Oct 2, 2018 at 12: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 > ********************************************************************** -- Kirk Brooks San Francisco, CA ======================= *We go vote - they go home* ********************************************************************** 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 **********************************************************************