Re: Collection

2021-07-19 Thread stardata.info via 4D_Tech
Thanks David. /Ferdinando/ Il 19/07/2021 16:44, David Ringsmuth ha scritto: Ferdinando, A single object field can do this nicely. In my example below I show how a collection can store what you need. A collection is similar to an array in that it has indexed elements starting at [0

Re: Collection

2021-07-19 Thread stardata.info via 4D_Tech
type of data in a collection, in an object field. Data_ob is Object Everyother property in the object is typed upon assignment. [Table]Data_ob.survey.UUID [Table]Data_ob.survey.Name [Table]Data_ob.survey.createdDtTm [Table]Data_ob.survey.submittedDtDm [Table]Data_ob.survey.recordId [Table

Re: Collection

2021-07-18 Thread stardata.info via 4D_Tech
Hi All, What is field type is better to use for save the collection variables type? Thanks Ferdinando Il 13/07/2021 15:31, Randy Kaempen ha scritto: Ferdinando, On Jul 13, 2021, at 5:04 AM, stardata.info <http://stardata.info> via 4D_Tech <4d_tech@lists.4d.com <mailto:4d_tech@

Re: Collection

2021-07-13 Thread Randy Jaynes via 4D_Tech
I’ve started using object fields for stuff like this to avoid all the parsing. Object fields can be queried now so it really is nicer to use, as well as easier to debug. Randy -- Randy Jaynes Senior Programmer and Customer

Collection

2021-07-13 Thread stardata.info via 4D_Tech
I All, I need to save some information of several type in one record. For example for one test i need to save more than one result. These results are variables, 20/30/40 results for every test. So for one test, I need to save a variable number of rows. For every row, I have more than one

Re: Distinct Collection

2020-05-04 Thread Paul Dennis via 4D_Tech
Thanks Jim, Using OrderBy and push is exactly what I ended up doing. Its faster and the orda code is simpler than managing a lot of arrays. Paul -- Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html ** 4D Internet

Re: Distinct Collection

2020-05-01 Thread James Crate via 4D_Tech
On Apr 29, 2020, at 2:21 PM, Paul Dennis via 4D_Tech <4d_tech@lists.4d.com> wrote: > > I have a collection created from arrays via mysql. This contains duplicated > elements. I'm trying to do the equivalent of distinct values but the > collection.distinct command does not

Re: Distinct Collection

2020-05-01 Thread James Crate via 4D_Tech
On Apr 29, 2020, at 2:21 PM, Paul Dennis via 4D_Tech <4d_tech@lists.4d.com> wrote: > > I have a collection created from arrays via mysql. This contains duplicated > elements. I'm trying to do the equivalent of distinct values but the > collection.distinct command does not

Distinct Collection

2020-04-29 Thread Paul Dennis via 4D_Tech
I have a collection created from arrays via mysql. This contains duplicated elements. I'm trying to do the equivalent of distinct values but the collection.distinct command does not do the distinction on a single attribute. This is really slow and doesn't seem to work. ARRAY TO COLLECTION

Re: Editing a time in a collection-based list box

2020-02-14 Thread Jeffrey Kain via 4D_Tech
Thanks, Erick... > On Feb 14, 2020, at 3:48 PM, ericklui678 via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > You will have to convert the longint to Time then to a String in the > Expression pane of the property list as shown below: > > https://kb.4d.com/assetid=78298

Re: Editing a time in a collection-based list box

2020-02-14 Thread ericklui678 via 4D_Tech
You will have to convert the longint to Time then to a String in the Expression pane of the property list as shown below: https://kb.4d.com/assetid=78298 -- Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html **

Re: 3D Button collection? (Or manufacturing)

2019-11-19 Thread Chris Belanger via 4D_Tech
sign icons - seems like a pretty > large collection in 5 styles: > https://material.io/resources/icons/ > > I'm sure there are some other collections like this but can't recall from > memory - I will post if I can track them down. > > Regards, > Narinder Chandi, > T

Re: 3D Button collection? (Or manufacturing)

2019-11-08 Thread Narinder Chandi via 4D_Tech
r Chandi <4dtechmailingl...@toolbox.uk.com> Subject: Re: 3D Button collection? (Or manufacturing) You could take a look at Google Material Design icons - seems like a pretty large collection in 5 styles: https://material.io/resources/icons/ I'm sure there are some other c

Re: 3D Button collection? (Or manufacturing)

2019-11-08 Thread Narinder Chandi via 4D_Tech
You could take a look at Google Material Design icons - seems like a pretty large collection in 5 styles: https://material.io/resources/icons/ I'm sure there are some other collections like this but can't recall from memory - I will post if I can track them down. Regards, Narinder Chandi

Re: 3D Button collection? (Or manufacturing)

2019-11-08 Thread Maurice Inzirillo via 4D_Tech
; I was wondering if there is any ‘button collection’ one can use (with 3D > Button). > > I am not an artist and that part of UI development is not my forte. > > I sometimes use Unicode characters with regular buttons, but it would be > better to use 3D buttons. > > Otherwise,

RE: 3D Button collection? (Or manufacturing)

2019-11-08 Thread Stephen J. Orth via 4D_Tech
ris Belanger Subject: 3D Button collection? (Or manufacturing) I was wondering if there is any ‘button collection’ one can use (with 3D Button). I am not an artist and that part of UI development is not my forte. I sometimes use Unicode characters with regular buttons, but it would be bette

3D Button collection? (Or manufacturing)

2019-11-08 Thread Chris Belanger via 4D_Tech
I was wondering if there is any ‘button collection’ one can use (with 3D Button). I am not an artist and that part of UI development is not my forte. I sometimes use Unicode characters with regular buttons, but it would be better to use 3D buttons. Otherwise, what do you use to make yours

3D Button collection? (Or manufacturing)

2019-11-08 Thread Chris Belanger via 4D_Tech
I was wondering if there is any ‘button collection’ one can use (with 3D Button). I am not an artist and that part of UI development is not my forte. I sometimes use Unicode characters with regular buttons, but it would be better to use 3D buttons. Otherwise, what do you use to make yours

Re: Entity selection / collection listbox

2019-07-08 Thread Jeremy Roussak via 4D_Tech
Miyako, Thanks. So if I’m writing entirely generic code to set up listboxes of any type, I need separate starting-point templates for entity selection boxes and collection boxes, just as I have separate templates for selection boxes and array-based boxes? Jeremy > On 8 Jul 2019, at 10

Re: Entity selection / collection listbox

2019-07-08 Thread Keisuke Miyako via 4D_Tech
my understanding is that when you assign an entity selection (which is an object, not collection) as the data source of a listbox, a kind of proxy collection is created to bind the entity selection to the UI. basic features are common ("This" is an object and This.property

Entity selection / collection listbox

2019-07-08 Thread Jeremy Roussak via 4D_Tech
Apologies if this is a silly question; I’m still trying to get to grips with ORDA. As I understand it, an entity selection is an object. If I define a listbox whose source is “collection or entity selection”, must it be one or the other? In other words, can I change it at runtime from

Re: How to use collection.query for specific element of embedded collection

2019-04-26 Thread Keisuke Miyako via 4D_Tech
square brackets have a specific meaning in query by attribute see Example 5 or Linking array attribute query arguments (16R2 and later) https://doc.4d.com/4Dv17/4D/17.1/QUERY-BY-ATTRIBUTE.301-4178904.en.html > 2019/04/27 2:01、Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com>のメール: > >

Re: How to use collection.query for specific element of embedded collection

2019-04-26 Thread Christian Sakowski via 4D_Tech
Hi Kirk, in your example it should work like: $obj:=New object("id";"some string";"fields";New collection(New object("i";0;"name";"value1");New object("i";1;"name";"value2");New object("i";

How to use collection.query for specific element of embedded collection

2019-04-26 Thread Kirk Brooks via 4D_Tech
Imagine a collection or entity selection populated with objects like: { id: "some string", fields: [ {i:0, name:value1}, {i:1, name:value2}, {i:2, name:value3}, ... ] } I want to find collection elements by searching for 'fields[1].name' = someValue. That is, only matches on

Re: Collection of JSON Arrays to a Flat Array

2019-04-09 Thread Sannyasin Siddhanathaswami via 4D_Tech
Siddhanathaswami On Apr 9, 2019, 4:59 PM -1000, Sannyasin Siddhanathaswami via 4D_Tech <4d_tech@lists.4d.com>, wrote: Aloha, Is there an easy way to make an collection of JSON arrays into a single flat array using the new ORDA collection commands? Here’s a screenshot of the data:

Collection of JSON Arrays to a Flat Array

2019-04-09 Thread Sannyasin Siddhanathaswami via 4D_Tech
Aloha, Is there an easy way to make an collection of JSON arrays into a single flat array using the new ORDA collection commands? Here’s a screenshot of the data: https://www.dropbox.com/s/mmjrxfn4t2umejh/collectiontoarray.png?dl=0 If there’s no easy way, I can loop through and manually do

[TIP] Moving elements of a collection

2019-04-03 Thread Kirk Brooks via 4D_Tech
Collections are not arrays. So is I have a collection based listbox and want to have a control to allow the user to move a selected element within the collection how do I do that? One way would be to allow her to drag and drop the element to the new position. The other way is a spinner of some

Re: Getting a collection created from 4D function to work in Storage.

2019-03-20 Thread John DeSoi via 4D_Tech
The first line does nothing because you don't do anything with the function result of the call. The second line assigning $myTempVolumeCol to a copy returns a regular collection (see documentation). The error is because you can't assign a regular collection to a shared collection

Getting a collection created from 4D function to work in Storage.

2019-03-20 Thread Eric Naujock via 4D_Tech
I am having a curious time with this one. I am trying to get a collection retrieved from Get System Info to be saved into the Storage Collection. Right now I am using the following to get the information. $systemInfo:=Get system info $volumeCollections:= $systemInfo.volumes

Re: listbox commands and collection variables

2019-01-23 Thread Kirk Brooks via 4D_Tech
John, On Wed, Jan 23, 2019 at 6:31 PM John DeSoi via 4D_Tech <4d_tech@lists.4d.com> wrote: > $1 is a pointer to the collection listbox variable and the debugger shows > it has 10 elements. The object name on the form is the same as the variable > name. If I execute it with the nam

Re: listbox commands and collection variables

2019-01-23 Thread John DeSoi via 4D_Tech
Hi Kirk, > I'm not able to replicate all of the issues you mention with a collection > based listbox. To test I made a form and added a collection based listbox > with two columns. To open it I made a method, created a collection with 10 > elements comprised of objects and had

Re: listbox commands and collection variables

2019-01-23 Thread Kirk Brooks via 4D_Tech
Hey John, I'm not able to replicate all of the issues you mention with a collection based listbox. To test I made a form and added a collection based listbox with two columns. To open it I made a method, created a collection with 10 elements comprised of objects and had the listbox displace

listbox commands and collection variables

2019-01-22 Thread John DeSoi via 4D_Tech
17.0 HF4 Mac I've noticed that a lot of generic listbox code fails with collection variables. For example, in passing a listbox pointer to a method such as LISTBOX SELECT ROW($arrayListbox->;$row) `works LISTBOX SELECT ROW($selectionLisbox->;$row) `works LISTBOX SELECT ROW($collection

[TIP] Hiding rows of a collection based listbox (you can't and that's OK)

2019-01-10 Thread Kirk Brooks via 4D_Tech
meArray{$i}#$search_str End for I was updating a form that uses this trick to be a collection based listbox. Collection based listboxes are so much more dynamic and flexible I think it's worth the effort to convert them in most cases. But that's another post. This post is about how to get the same ef

Re: Collection of Telemetry Data

2018-11-09 Thread Douglas Cryer via 4D_Tech
Robert, I am up for exchanging ideas and I recognise some of the things that you want to do as things that have been done in a variety of ways in the past in various systems I have worked on. For one of our systems licenses are managed via a simple file placed on an FTP which the system with

Re: Collection of Telemetry Data

2018-11-09 Thread Jeremy French via 4D_Tech
For communicating, take a look at: http://doc.4d.com/4Dv17R2/4D/17-R2.1720/HTTP-Request.301-3856768.en.html > On Nov 9, 2018, at 2:39 AM, Robert ListMail via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > I imagine this

Collection of Telemetry Data

2018-11-08 Thread Robert ListMail via 4D_Tech
I know that Jody has some expertise on this where he rolled his own remote data mirror. In my case, I just want my apps to phone home via the magic of the internet. I’d like to collect usage data to see what areas and features are used. I imagine this data would be collected in local tables

Re: Checkbox in collection based listbox

2018-11-07 Thread Andrew Hickey via 4D_Tech
Hi Jeff and Jeremy, Thanks. Once I updated the form in 64 bit I could select types (in 32, I get an empty list for types and anything that is typed gets propagated to the other columns. Once I could make it a boolean I could then ensure it used a checkbox. Cheers, Andrew -- Sent from:

Re: Checkbox in collection based listbox

2018-11-07 Thread Jeremy French via 4D_Tech
x, the option > does not appear under the Display section of the properties and so far I > have not been able to use OBJECT Set Format to force it as part of the On > Load handler. > > has anyone else had success with check boxes and Collection based list > boxes? I

Re: Checkbox in collection based listbox

2018-11-07 Thread Jeffrey Kain via 4D_Tech
It's a bug in the property list -- the option appears in either the 64-bit or the 32-bit version only (sorry - I don't remember which). Switch over to whichever version you're not using and set this property, and it will display fine in the other. Did that make sense? :) Jeff > On Nov 7,

Re: Setting up an entity / collection listbox in code

2018-10-31 Thread Jeremy Roussak via 4D_Tech
Julio, you provide the answer to my question, which is “no”. I’m disappointed, I must confess. Everyone, thanks for suggesting workarounds. I hope the ability to specify the properties in code will be implemented - and soon! Jeremy > On 30 Oct 2018, at 20:10, Julio Carneiro via 4D_Tech

Re: Setting up an entity / collection listbox in code

2018-10-30 Thread John DeSoi via 4D_Tech
Maybe it could work if you adopted the convention that the collection properties are based on the listbox object name, e.g. Form.listbox1__currentItem Form.listbox1__selectedItems etc. You would have to adjust these properties after the first listbox, but I assume the component could manage

Re: Setting up an entity / collection listbox in code

2018-10-30 Thread Julio Carneiro via 4D_Tech
> wrote: >> >>> It’s great to be able to make generic listboxes and set them up entirely in >>> code. It’s easy for array-based and selection-based listboxes, but can it >>> be done for entity/collection boxes? >> >> Yes. It's even more

Re: Setting up an entity / collection listbox in code

2018-10-30 Thread Jeremy Roussak via 4D_Tech
in >> code. It’s easy for array-based and selection-based listboxes, but can it be >> done for entity/collection boxes? > > Yes. It's even more easy using collections. > >> In other words, are there LISTBOX SET xx calls to identify the names of the >>

Re: Setting up an entity / collection listbox in code

2018-10-29 Thread Kirk Brooks via 4D_Tech
s on the parent form and the subform object itself can be a collection or object. Now the cool part is the contents of the subform Form object ARE the Form object of the subform. And these can be linked to the parent form's Form. This is particularly convenient for configuring LBs for tools or contr

Re: Setting up an entity / collection listbox in code

2018-10-29 Thread Jeremy French via 4D_Tech
> It’s great to be able to make generic listboxes and set them up entirely in > code. It’s easy for array-based and selection-based listboxes, but can it be > done for entity/collection boxes? Yes. It's even more easy using collections. > In other words, are there LISTBOX

Setting up an entity / collection listbox in code

2018-10-29 Thread Jeremy Roussak via 4D_Tech
It’s great to be able to make generic listboxes and set them up entirely in code. It’s easy for array-based and selection-based listboxes, but can it be done for entity/collection boxes? In other words, are there LISTBOX SET xx calls to identify the names of the variables unique to entity

Storage + new shared collection

2018-09-18 Thread Jonathan Marohn via 4D_Tech
I'm having a problem with adding a new shared collection. when I hit the last "End use" the whole storage become and empty object. Sometimes the storage maintains what was put in but most of the time it ends up in the debugger as storage {} Any insight would be helpful. This is some s

Re: selected rows for a collection listbox

2018-08-05 Thread John DeSoi via 4D_Tech
I found a solution that has good performance and does not require creating thousands of objects for rows that will never be displayed. - The listbox collection is initially setup as a collection of row numbers. Using ARRAY TO COLLECTION seems to be the fastest way to do this. About 30

Re: Adding elements to a listbox containing a collection

2018-08-01 Thread Two Way Communications via 4D_Tech
even though > > col.push() > > adds an element to the collection, > in this context (listbox on form), > you have to assign the variable to itself: > > col:=col.push() > > 2018/08/02 5:24、Christian Sakowski via 4D_Tech > <4d_tech

Re: Adding elements to a listbox containing a collection

2018-08-01 Thread Keisuke Miyako via 4D_Tech
that's right, you have to "touch" the data source object to signal that it is dirty and has to be redrawn. so, even though col.push() adds an element to the collection, in this context (listbox on form), you have to assign the variable to itself: col:=col.push() 2018/08/02 5:24

Re: Adding elements to a listbox containing a collection

2018-08-01 Thread Christian Sakowski via 4D_Tech
You have to assign the collection to itself: Form.cColl:=Form.cColl Then the Listbox will be updated. -- Grüße/Regards, [heubach-media] | Christian Sakowski christian.sakow...@heubach-media.de iChat/AIM: SakowskiF Tel: +49/(0)40/52 10 59-23 > Am 01.08.2018 um 22:19 schrieb Two

Adding elements to a listbox containing a collection

2018-08-01 Thread Two Way Communications via 4D_Tech
I guess I must be overlooking the obvious here … I searched the documentation, the NUG, the Blog but could not find an answer, so maybe somebody can help me out. I have a collection that is being displayed inside a listbox. So far so good. No issues. I can select the rows and I can edit

Re: selected rows for a collection listbox

2018-07-30 Thread Kirk Brooks via 4D_Tech
Hey John, On Mon, Jul 30, 2018 at 7:05 PM John DeSoi via 4D_Tech <4d_tech@lists.4d.com> wrote: > The selected row numbers matter if you are not using ORDA or a fully > materialized collection of objects. I hesitant to comment directly on what you're doing because frankly you ar

Re: selected rows for a collection listbox

2018-07-30 Thread John DeSoi via 4D_Tech
Hi Kirk, Great summary, thanks for posting. > On Jul 30, 2018, at 10:27 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > Eventually I got the concept of manipulating the data in the collection > instead of in the listbox is the key. This is why it doesn't

Re: selected rows for a collection listbox

2018-07-30 Thread Kirk Brooks via 4D_Tech
I can elaborate on this a little bit - I've been working with collection based list boxes quite a bit recently. A good starting point is the blog : https://blog.4d.com/multilevel-collection-in-different-listboxes/ https://blog.4d.com/display-a-collection-in-a-listbox/ and Laurant's demo from

Re: selected rows for a collection listbox

2018-07-30 Thread Chip Scheide via 4D_Tech
sed on heavy usage of "This", "Form", and member functions. > > 2018/07/30 22:34、Chip Scheide via 4D_Tech > <4d_tech@lists.4d.com<mailto:4d_tech@lists.4d.com>> のメール: > what do you mean by a 'collection' listbox? > > > *

Re: selected rows for a collection listbox

2018-07-30 Thread Kirk Brooks via 4D_Tech
Chip, In v17 you can associate a listbox with a collection or object in addition to the data sources we're accustomed to: arrays, current selection or named selection. John and Miyako are talking about about one of these new ones. On Mon, Jul 30, 2018 at 6:34 AM Chip Scheide via 4D_Tech < 4d_t

Re: selected rows for a collection listbox

2018-07-30 Thread Keisuke Miyako via 4D_Tech
4d.com>> のメール: what do you mean by a 'collection' listbox? ** 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 **

Re: selected rows for a collection listbox

2018-07-30 Thread Chip Scheide via 4D_Tech
John, what do you mean by a 'collection' listbox? if the listbox is from a selection then the highlighted record(s) are in the set specified by: highlight set property and the selected row(s) should be the select record number(s) if the listbox is an array then the selected item(s) are True

Re: selected rows for a collection listbox

2018-07-29 Thread Keisuke Miyako via 4D_Tech
cess the remote data source once, when the current item is null). but I still have the feeling that completing a null-populated collection "on demand" is not going to be in any ways more efficient compared to having a pre-populated placeholder collection (especially if the number

Re: selected rows for a collection listbox

2018-07-29 Thread Keisuke Miyako via 4D_Tech
/16.3/Displayed-line-number.301-3652452.en.html 2018/07/30 12:34、John DeSoi via 4D_Tech <4d_tech@lists.4d.com<mailto:4d_tech@lists.4d.com>>のメール: I want to leave the collection elements as Null and only load them on demand (displayed or the user selected them to do something). I'm t

Re: selected rows for a collection listbox

2018-07-29 Thread John DeSoi via 4D_Tech
no need to work with the "On Display Detail" event. Yes, nice model and works great if you are using ORDA. I'm not using ORDA here and want to take advantage of the same type of on demand loading. 4D thought it was important enough to tell you the row number of the selected collection it

Re: selected rows for a collection listbox

2018-07-29 Thread Keisuke Miyako via 4D_Tech
normally with collections, you shouldn't have to care about the position of each element. it's how "For each" works and member functions such as "map" or "filter" works. "to operate on the selected rows as a collection implies that every row has to be loaded

Re: selected rows for a collection listbox

2018-07-29 Thread John DeSoi via 4D_Tech
It is not ORDA. I'm displaying a server side cursor from PostgreSQL. The select result may have hundreds of thousands of rows. I can scroll that nicely in 4D using On Display Detail to load only the visible data. But to operate on the selected rows as a collection implies that every row has

Re: selected rows for a collection listbox

2018-07-29 Thread Keisuke Miyako via 4D_Tech
a collection of objects rather than the row numbers makes this impractical. impractical how? ORDA is lazy loading by nature, so it doesn't matter if the row is visible or not. 2018/07/30 10:13、John DeSoi via 4D_Tech <4d_tech@lists.4d.com<mailto:4d_tech@lists.4d.com>>のメール: How do

Re: selected rows for a collection listbox

2018-07-29 Thread John DeSoi via 4D_Tech
How does the third one give me the *row numbers* of the highlighted rows other than sequentially searching for each item? That was my original question. I want to use a collection based list box to represent data from a remote source. I only need to load enough data to display the visible rows

Re: selected rows for a collection listbox

2018-07-29 Thread Keisuke Miyako via 4D_Tech
there are 3 properties you can have 4D manage automatically (that is, read-only by code) current item (typically an object) current item position (typically numeric), and selected items (typically a collection) http://doc.4d.com/4Dv17/4D/17/List-box-specific-properties.300-3743666.en.html use

selected rows for a collection listbox

2018-07-29 Thread John DeSoi via 4D_Tech
Is there a way to get all of the highlighted row numbers for a collection listbox? It seems you can only get the first highlighted row number via the currentItemPosition property. The selectedItems property would return a collection of highlighted items, but at best you would have

Having issues with scalar collection in a listbox

2018-07-15 Thread Kirk Brooks via 4D_Tech
For context I recommend these two blog posts about displaying collections in listboxes: https://blog.4d.com/display-a-collection-in-a-listbox/ https://blog.4d.com/multilevel-collection-in-different-listboxes/ I have a very simple situation that's frustrating the heck out of me. A parent form

Re: How do I get the type of a Collection element? (v16r6)

2018-04-26 Thread Julio Carneiro via 4D_Tech
The problem comes up when you’re working with Entity selections, where your time fields are converted to longints. Then Type or Value type of an Entity instance value does not match the field type. There’s a problem with Arrays in a Collection. Type returns 0, longint, because 4D Array variable

Re: How do I get the type of a Collection element? (v16r6)

2018-04-26 Thread Kirk Brooks via 4D_Tech
rote: > > > If I'm iterating through a collection how can I get the type of an > element? > > Here are some results from current attempts: > > $col:=New collection(New object;123;"XYZ";New collection) > > $type:=Type($col) // type = 42 > > $type:=Type($col[

Re: How do I get the type of a Collection element? (v16r6)

2018-04-26 Thread Kirk Brooks via 4D_Tech
Thanks John On Thu, Apr 26, 2018 at 8:42 AM John DeSoi via 4D_Tech <4d_tech@lists.4d.com> wrote: > New command, Value type: > > $type:=Value type($col[0]) > > And note if you use the new For each loop in version 17, all collection > elements must have the same ty

Re: How do I get the type of a Collection element? (v16r6)

2018-04-26 Thread John DeSoi via 4D_Tech
New command, Value type: $type:=Value type($col[0]) And note if you use the new For each loop in version 17, all collection elements must have the same type. John DeSoi, Ph.D. > On Apr 26, 2018, at 10:36 AM, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> > wrote: > >

How do I get the type of a Collection element? (v16r6)

2018-04-26 Thread Kirk Brooks via 4D_Tech
If I'm iterating through a collection how can I get the type of an element? Here are some results from current attempts: $col:=New collection(New object;123;"XYZ";New collection) $type:=Type($col) // type = 42 $type:=Type($col[0]) // err: 4D was expecting a field or variable or param

Array of objects and collection

2018-01-31 Thread Arnaud de Montard via 4D_Tech
upgrading to v16R5, the code goes to unexpected because $type returns Is collection (42). Easy to deal with, but is it normal that 4D makes no difference between a collection and a "true" object array? -- Arnaud de Montard **