Precisely Speaking
May 18, 2012, 04:00:00 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: So what's news with you?  Tell us about it in "Getting To Know You"!
 
   Home   Help Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Complex Select Process - multivalues from multiple records  (Read 1792 times)
Tom Pellitieri
Rock Star
*****
Posts: 170


Tom Pellitieri - Toledo, Ohio


« on: December 15, 2009, 06:34:58 AM »

I'm working on a new call tracking entry screen and need some advice on how to set up an F3 Select process for Contact Names.  I know how to get the names using UniData TCL, but I need to use a /PD.S and am uncertain how to proceed.

Each customer in our system has one billing address, and one or more shipping locations.  We maintain a multi-valued list of Contacts based on the shipping location.  The calls, however, are only being tracked by billing address.

At UniData TCL, I can do the following to get the list of names I want to display:

select CONTACTS WITH CUST.NUM = "123456" SAVING UNIQUE NAME

How do I get a Select process to provide the results of this SELECT statement in an F3 lookup?  Any ideas?

Please note that the SELECT statement isn't perfect, since an attribute and value position are appended to the name, separated by value marks.
Logged
precisonline
President/Chief Technologist
Administrator
Rock Star
*****
Posts: 1532



WWW
« Reply #1 on: December 15, 2009, 10:16:54 AM »

At first I was going to recommend adding an S: to the front of the command, but I think SB+ might have some problem with the SAVING UNIQUE part of that.

Selecting records and returning something other than the key is one of those things that a typical /PD.S doesn't really support all that well.  Adding in the SAVING UNIQUE and it's definitely coloring outside the /PD.S lines.

I would probably have you try something like my SELECT.TO.LIST paragraph (in the standard processes document at http://www.precisonline.com/pdf/stdproc.pdf) to execute the Unidata selection statement and save the results to a list.  Then have the /PD.S display the contents of the list with a "G" option to return the first displayed field.

With the SAVING UNIQUE I'm assuming that you really want the name, not the contact number from the selection.  If you want the contact number associated with that name... that'll be a little different.
Logged

-Kevin
Accidents "happen"; success, however, is planned and executed.
Tom Pellitieri
Rock Star
*****
Posts: 170


Tom Pellitieri - Toledo, Ohio


« Reply #2 on: December 15, 2009, 11:58:31 AM »

...SAVING UNIQUE {is} definitely coloring outside the /PD.S lines. ...

More like on an entirely different page, but, yeah.. I know ... that's why I asked for some insight!
Logged
precisonline
President/Chief Technologist
Administrator
Rock Star
*****
Posts: 1532



WWW
« Reply #3 on: December 16, 2009, 09:08:48 AM »

There's a bunch of cool U2 select stuff that's on a different page than /PD.S, which is the point of the SELECT.TO.LIST routine in that document I mentioned.  If it can be done @ TCL, this process makes it possible in SB+.
Logged

-Kevin
Accidents "happen"; success, however, is planned and executed.
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!