Jim

 

Try using a Variable Lookup List View run by the variable vTO

 

Build your Where clause and put it into the WHERE Clause in the Variable Lookup 
List View (Effects tab) as "Where &vWhere"

 

In your variable VTo build your search string  to include in your Whereclause.

 

As you type in your variable VTo, all possibilities using CONTAINS will 
populate the variable lookup listview.

 

It is then a simple matter of clicking on the name you want or a button to add 
new.

 

You can have the variable look up list view HID ON STARTUP and unhide when 
entering in your variable vTo.

 

In the Form on before start eep;

SET VAR vQuotes = (CVAL('QUOTES'))

SET VAR vMany = (CVAL('MANY'))

RETURN

 

In the Form On After Start EEP:

--Define Variables Here

set v vTo text=null

set v vsearchwhat text=null

SET VAR vKeyword text=NULL

SET VAR vSearchString text=NULL

SET VAR vWhereClause text=NULL

etc, etc

recalc variables

property ve_vTO set_focus 'true'

RETURN

 

In the Variable vTo ON KEYPRESS EEP;

getproperty keyword textvalue vkeyword

if (slen(.vkeyword)) < .vlen then

  goto endapp

endif

if vsearchwhat in (field name) the

  set v vkeyword text

  set v vwhereclause=(.vsearchwhat+'='+.vkeyword&.vWhere2)

  set v vkeyword int

else

  if vsearchwhat not in (field name) the

    set var vsearchstring = (.vquotes+.vkeyword+.vmany+.vquotes)

    set var vwhereclause=  +

      (.vsearchwhat+' like '&.vsearchstring&.vWhere2)

    recalc variables

  endi

endi

 

I know it's a little complicated but works great !

 

Give it a try.

 

 

Best,

 

Bill Eyring

Lamp Software Inc

516-965-3890

 

 

 

From: [email protected] [mailto:[email protected]] On Behalf Of 
Jim Belisle
Sent: Friday, June 21, 2019 5:59 PM
To: [email protected]
Subject: [RBASE-L] - form control

 

I use a variable edit control for the email addresses in my RMAIL email form. 
This variable in most cases is automatically filled and the user does not need 
to change the address.

However my sales people would like to be able to change the address or add one 
in cases where an address is not automatic.

I know I can have a button off to the side but I would rather them be able to 
start typing in the field to bring up other email addresses.

Right now I use code that allows them to start typing but it then brings up a 
popup because I am using that option. 

This below code works but it is not really working the way I want it to work. 

 

GETPROPERTY Comp_to TEXTVALUE 'vto'

SET VAR vQuotes = (CVAL('QUOTES'))

SET VAR vMany = (CVAL('MANY'))

SET VAR vSearchString TEXT = NULL

SET VAR vWhereClause TEXT = NULL

SET VAR vSearchString = (.vQuotes+.vMany+.vto+.vMany+.vQuotes)

-- Define Where Clause

SET VAR vWhereClause = ('EmailTo CONTAINS'&.vSearchString)

CHOOSE vwhereclause FROM #VALUES FOR DISTINCT Emailto +

FROM Emailinformation ORDER BY Emailto +

CAPTION 'TO' LINES 20 FORMATTED

IF vto = '[esc]' THEN

  PROPERTY FROM SET_FOCUS 'TRUE'

  RETURN

ENDIF

SET VAR vTo = .vWhereClause

 

This works as a LIKE clause instead of a CONTAINS clause as I wish. 

Any suggestions?

 

James Belisle

 

Making Information Systems People Friendly Since 1990

cid:[email protected]

 

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/DM6PR02MB4539032F1618D2F0697FCC2FA0E70%40DM6PR02MB4539.namprd02.prod.outlook.com
 
<https://groups.google.com/d/msgid/rbase-l/DM6PR02MB4539032F1618D2F0697FCC2FA0E70%40DM6PR02MB4539.namprd02.prod.outlook.com?utm_medium=email&utm_source=footer>
 .
For more options, visit https://groups.google.com/d/optout.

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/003d01d52a0d%24f1013fb0%24d303bf10%24%40com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to