Re: Object from row in selection listbox
Hi Jeremy, I don't think there is a way to do that without using GOTO RECORD. ORDA does not use record numbers, you need the primary key to do a direct entity lookup (dataClass.get). John DeSoi, Ph.D. > On Jan 2, 2020, at 12:27 PM, Jeremy Roussak via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > It works very nicely, John, so thanks again. > > One further question: if I know a record’s record number, how do I use ORDA > to create an entity containing that record (more or less the equivalent of > GOTO RECORD)? > > I’m finding ORDA quite exciting, but it’s tricky (for me, anyway) to do some > things which have become second-nature under the “old” approach. ** 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: Object from row in selection listbox
It works very nicely, John, so thanks again. One further question: if I know a record’s record number, how do I use ORDA to create an entity containing that record (more or less the equivalent of GOTO RECORD)? I’m finding ORDA quite exciting, but it’s tricky (for me, anyway) to do some things which have become second-nature under the “old” approach. Jeremy > On 28 Dec 2019, at 19:43, John DeSoi via 4D_Tech <4d_tech@lists.4d.com> wrote: > > By "selection based listbox" I assume you mean traditional record selection > listbox and not an entity selection/collection listbox. I have not tested > this, but I think it will work without changing the highlighted records or > scroll position. > > COPY SET("UserSet";"MySet") > CUT NAMED SELECTION([Table];"CurrentSelection") > USE SET("MySet") > $entitySelection:=Create entity selection([Table]) > USE NAMED SELECTION("CurrentSelection") > COPY SET("MySet";"UserSet") > > Since it is not possible to pass an entity selection from one process to > another, it would be really nice if 4D provided direct commands to convert > sets and named selections into entity selections. > > John DeSoi, Ph.D. > > >> On Dec 28, 2019, at 7:35 AM, Jeremy Roussak via 4D_Tech >> <4d_tech@lists.4d.com> wrote: >> >> I have a selection-based listbox. I’d like to make an entity selection from >> the highlighted rows in the box. Is there an easy way? I’m new to ORDA, so >> I'probably missing something obvious. ** 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: Object from row in selection listbox
Thanks for that, John. Your assumption is correct, and it does indeed look as if it will work. I’ll give it a try. Jeremy > On 28 Dec 2019, at 19:43, John DeSoi via 4D_Tech <4d_tech@lists.4d.com> wrote: > > By "selection based listbox" I assume you mean traditional record selection > listbox and not an entity selection/collection listbox. I have not tested > this, but I think it will work without changing the highlighted records or > scroll position. > > COPY SET("UserSet";"MySet") > CUT NAMED SELECTION([Table];"CurrentSelection") > USE SET("MySet") > $entitySelection:=Create entity selection([Table]) > USE NAMED SELECTION("CurrentSelection") > COPY SET("MySet";"UserSet") > > Since it is not possible to pass an entity selection from one process to > another, it would be really nice if 4D provided direct commands to convert > sets and named selections into entity selections. > > John DeSoi, Ph.D. > > >> On Dec 28, 2019, at 7:35 AM, Jeremy Roussak via 4D_Tech >> <4d_tech@lists.4d.com> wrote: >> >> I have a selection-based listbox. I’d like to make an entity selection from >> the highlighted rows in the box. Is there an easy way? I’m new to ORDA, so >> I'probably missing something obvious. ** 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: Object from row in selection listbox
By "selection based listbox" I assume you mean traditional record selection listbox and not an entity selection/collection listbox. I have not tested this, but I think it will work without changing the highlighted records or scroll position. COPY SET("UserSet";"MySet") CUT NAMED SELECTION([Table];"CurrentSelection") USE SET("MySet") $entitySelection:=Create entity selection([Table]) USE NAMED SELECTION("CurrentSelection") COPY SET("MySet";"UserSet") Since it is not possible to pass an entity selection from one process to another, it would be really nice if 4D provided direct commands to convert sets and named selections into entity selections. John DeSoi, Ph.D. > On Dec 28, 2019, at 7:35 AM, Jeremy Roussak via 4D_Tech > <4d_tech@lists.4d.com> wrote: > > I have a selection-based listbox. I’d like to make an entity selection from > the highlighted rows in the box. Is there an easy way? I’m new to ORDA, so > I'probably missing something obvious. ** 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: Object from row in selection listbox
Yes, just write e. g. „Form.myselection“ in the property-list of the listbox for „selected items“. -- Grüße/Regards, [heubach-media] | Christian Sakowski christian.sakow...@heubach-media.de Tel: +49/(0)40/41 455 455 > Am 28.12.2019 um 14:35 schrieb Jeremy Roussak via 4D_Tech > <4d_tech@lists.4d.com>: > > I have a selection-based listbox. I’d like to make an entity selection from > the highlighted rows in the box. Is there an easy way? I’m new to ORDA, so > I'probably missing something obvious. > > Jeremy > ** > 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 **
Object from row in selection listbox
I have a selection-based listbox. I’d like to make an entity selection from the highlighted rows in the box. Is there an easy way? I’m new to ORDA, so I'probably missing something obvious. Jeremy ** 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 **