Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cursor for a one list mover?
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01161227
Message ID:
01161234
Views:
14
This message has been marked as the solution to the initial question of the thread.
I typically start with the list table as the primary and left outer join to the "already chosen" table... something like this...
select List.ListID,;
       List.ListID = Applies.ListID as WasChosen,;
       List.Description;
   from;
       List left outer join Applies;
          on List.ListID = Applies.ListID;
          and Applies.OwnerID = ?vp_OwnerID;
   into;
      cursor C_ListForGrid
You were on the right track, but this way, your getting every entry from the POSSIBLE list, and only IF there is a match on the Applied table (for the given owner by the parameter variable), will the "WasChosen" column be set (or not)





>I'm trying to build a grid to work like a one-list mover. The grid should be populated with a full list, with a checkbox marking (and changing) whether that entry applies. The only thing stored would be key numbers for the selected entries.
>
>I'm having trouble setting up the cursor so it always displays the full list and marks previously selected entries.
>
>SELECT applies.ownerid, list.listid, list.entry, ; && applies.applyid as logical?
>FROM applies RIGHT OUTER JOIN list on applies.listid = list.listid ;
>WHERE applies.ownerid = ?vp_ownerid
>
Previous
Reply
Map
View

Click here to load this message in the networking platform