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] through [collection.length-1]
Each index can store the property name and value of all five of your
arrays, for a single element of them all.
Collections are often initialized with the function collection:=New
Collection
Collections are often populated with the syntax
collection.push(“propertyNumber1”:number1,”propertyDate1”:date1, etc…)
With the above syntax you can assign a row of your five arrays to a
index in your collection.
For($i;0;length(myArray)-1)
Collection.push()
(or alternatively)
Collection[$i]:=New
Object(“propertyNumber1”:number1,”propertyDate1”:date1, etc…)
End for
I hope that helps!
David Ringsmuth
*From: *stardata.info <mailto:[email protected]>
*Sent: *Monday, July 19, 2021 9:23 AM
*To: *David Ringsmuth <mailto:[email protected]>; 4D iNug Technical
<mailto:[email protected]>
*Subject: *Re: Collection
Hi David,
I have a multi dimensional array that contain 5 coloumns and more rows.
So i need to save these informations in one field.
Thanks
/Ferdinando/
Il 19/07/2021 16:08, David Ringsmuth ha scritto:
Ferdinando,
I just did this with a “test” type of application where I stored
various 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]Data_ob.survey.formSubmit[SurveyName:”Class”,Id:285,Row:1,Value:3,Statement:”The
Class met on time.”]
[Table]Data_ob.survey.formSubmit[SurveyName:”Class”,Id:285,Row:1,Value:5,Statement:”The
Class room was comfortable.”]
David Ringsmuth
*From: *stardata.info via 4D_Tech <mailto:[email protected]>
*Sent: *Tuesday, July 13, 2021 5:04 AM
*To: *[email protected] <mailto:[email protected]>;
[email protected] <mailto:[email protected]>
*Cc: *stardata.info <mailto:[email protected]>
*Subject: *Collection
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 information (code, value,
times and
other )
Use the object field is a correct solution?
Or is better to use a text field with field separators and row
delimiters?
Thanks
Ferdinando
**********************************************************************
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com <https://discuss.4D.com>
Archive: http://lists.4d.com/archives.html
<http://lists.4d.com/archives.html>
Options: https://lists.4d.com/mailman/options/4d_tech
<https://lists.4d.com/mailman/options/4d_tech>
Unsub: mailto:[email protected]
<mailto:[email protected]>
**********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************