Yes - I've been coding ORDA for several months. Mostly for queries, some forms, 
and now looking to push deeper into it. I've used the USE ENTITY SELECTION with 
no problem with entitySelection.query() commands. I'm stuck with the .add issue.

On 4/2/20, 8:19 PM, "4D_Tech on behalf of Spencer Hinsdale via 4D_Tech" 
<[email protected] on behalf of [email protected]> wrote:

    
    
    did you check database compatibility setting that dot notation is enabled
    
    > On Apr 2, 2020, at 6:14 PM, Matt Bollwitt via 4D_Tech 
<[email protected]> wrote:
    > 
    > Hello –
    > 
    > I’m running into a condition where USE ENTITY SELECTION is not working 
with an entity selection that is built with entitySeletion.add() command. I’m 
wondering if I’m using it correctly. I’m running 4Dv17r6. Here is a simplified 
version of what I’m trying to do:
    > 
    > C_Object($sel;$sel_d;$sel_find)
    > C_Date(vFindDate)
    > vFindDate:=Date(ALERT("Enter date:"))
    > $sel_d:=ds.People.query("Receive_Mail = :1";True)           //all records 
to be compared
    > $sel_find:=ds.People.newSelection()  //empty entity
    > For each ($item;$sel_d)
    >                $sel:=ds.Entries.query("People_ID = :1 order by Entry_Date 
desc";$item.LinkID)
    >                If ($sel.length#0)              //anything found?
    >                                If ($sel[0].Entry_Date<=vFindDate)         
  //compare date of first entry
    >                                                $sel_find.add($item)
    >                                End if
    >                End if
    > End for each
    > USE ENTITY SELECTION($sel_find)
    > 
    > I can trace this and see that the $sel_find is a selection of entities 
from People. However, when I try to pull that entity selection back into a 
normal selection it does nothing. The selection of records in the People table 
is the same selection as it was before the method was ran.
    > 
    > Can you use the entitySelection.add command  to build the entity and then 
later use the USE ENTITY SELECTION command? I had this working using classic 4D 
commands and thought I’d convert it to ORDA. I’m wondering if I’m understanding 
the .add command correctly or if something else needs to be done with that 
object before I call the USE ENTITY SELECTION.
    > 
    > Thanks!
    > 
    > Matt Bollwitt
    > 
    > **********************************************************************
    > 4D Internet Users Group (4D iNUG)
    > Archive:  http://lists.4d.com/archives.html
    > Options: https://lists.4d.com/mailman/options/4d_tech
    > Unsub:  mailto:[email protected]
    > **********************************************************************
    **********************************************************************
    4D Internet Users Group (4D iNUG)
    Archive:  http://lists.4d.com/archives.html
    Options: https://lists.4d.com/mailman/options/4d_tech
    Unsub:  mailto:[email protected]
    **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to