Normal Topic @popupmenu()  question (Read 600 times)
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
@popupmenu()  question
Jun 18th, 2007 at 10:14pm
Print Post Print Post  
I am using @XLookupsourcelistAll with @popupmenu() to create a popup selection menu. On element exit of first name a selection box is created showing all available records from another db displayed as last, street address, city, state, zip, and company name. upon selection I use @AccessStringArray() to slug the values in the correct elements. My method works well except on very common names were there is a huge amount of choices available. A simple solution is to change my selection to be based on last names (that would greatly reduce selection choices) but before I make the change I was wondering if there is a technique to have the popup menu with the selections jump down the list as I type the first characters of the last name?

Also this may be a simple question but, what is the method to split long commands like:

vnamelistfromProspect = @XLookupsourcelistAll(@Fn, propertyBrokerFirst,"prospecting!prosfirstname", "proslastname;prosstreetaddress;prosstreetaddresscity;prosstreetaddressstate;pro
sstreetaddresszip;prosfirmname")

onto multiple lines for easier reading and editing while in program editor?

Thanks

Below is basically the code used in the first question


var vnamelistfromProspect as string
var Str2 as string
var Str3 as string
var Str4 as string
var Vchoice as string

If @isblank(propertybrokerlast)

     Then
{
           PopupSelectPosition(4, @XPos(propertybrokerlast), @YPos(propertybrokerlast) )
           vnamelistfromProspect = @XLookupsourcelistAll(@Fn, propertyBrokerFirst,"prospecting!prosfirstname", "proslastname;prosstreetaddress;prosstreetaddresscity;prosstreetaddressstate;pro
sstreetaddresszip;prosfirmname")

//Writeln(vnamelistfromProspect)



           str2 = @replace(vnamelistfromProspect, ";", ",")      
           str3 = @replace(str2, @newline(), ";")
           str3 = @sortstringArray(str3,0)
//Writeln(str2)
           str3 =@uniqueStringArray(str3)

           str4 = @popupmenu(str3, "please Select")
//Writeln(str4)      
           vchoice = @replace(str4, @newline(), ";")
           vchoice = @replace(vchoice, ",", ";")
           
           
           propertybrokerlast = @AccessStringArray(vchoice, 1)
           propertybrokerstreet = @AccessStringArray(vchoice, 2)
           propertybrokercity = @AccessStringArray(vchoice, 3)
           propertybrokerstate = @AccessStringArray(vchoice, 4)
           propertybrokerzip = @AccessStringArray(vchoice, 5)
           propertybrokercompany = @AccessStringArray(vchoice, 6)
           



//Writeln(vchoice)      


           
}
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: @popupmenu()  question
Reply #1 - Jun 18th, 2007 at 10:52pm
Print Post Print Post  
To "split" long strings - put them in with the string concatenation operator:
Code
Select All
var myStr as string

myStr = "one" +
"two" +
"three"
 

  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: @popupmenu()  question
Reply #2 - Jun 18th, 2007 at 11:10pm
Print Post Print Post  
Thanks Mark.

So should this work?

vnamelistfromProspect = @XLookupsourcelistAll(@Fn, propertyBrokerFirst,"prospecting! + prosfirstname", "proslastname;prosstreetaddress;prosstreetaddresscity; +
prosstreetaddressstate;prosstreetaddresszip;prosfirmname")
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: @popupmenu()  question
Reply #3 - Jun 18th, 2007 at 11:56pm
Print Post Print Post  
BOBSCOTT wrote on Jun 18th, 2007 at 11:10pm:
Thanks Mark.

So should this work?

vnamelistfromProspect = @XLookupsourcelistAll(@Fn, propertyBrokerFirst,"prospecting! + prosfirstname", "proslastname;prosstreetaddress;prosstreetaddresscity; +
prosstreetaddressstate;prosstreetaddresszip;prosfirmname")


No, but this should:
var vList as String

vList =
       "proslastname;prosstreetaddress;prosstreetaddresscity;" +
       "prosstreetaddressstate;prosstreetaddresszip;prosfirmname"

vnamelistfromProspect = @XLookupsourcelistAll(@Fn, propertyBrokerFirst, "prospecting!prosfirstname", vList)
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: @popupmenu()  question
Reply #4 - Jun 19th, 2007 at 3:14am
Print Post Print Post  
Thanks
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged