phpLens
 home  products examples manual  faq support forum  contact news  login store

More Examples:   View Source:   searchInEditNew

Free Download

This demo allows you to enter complaint records for products you are supporting. You can perform a search in the both the EDIT/NEW record forms for the product the customer is complaining about. Hint: search on R in the "prodname" field below.

  PHPLens
E New Srch
(E) (e)id (e)prodname (e)custname (e)telephone (e)Complaint
1
71027
ValeriaValeria77977319873very best job http://linuxrants.com/about-mike chances of twins on 150mg clomid "No company will be able to delay beyond ten years, and theCompetition Commission believes that many companies wouldbenefit from going out to tender more frequently at e
2
71028
IsaiahIsaiah25012110459It's funny goodluck <a href=" http://www.aiashreveport.org/members-officers/ ">destitute vermox uk always</a> This week, a Boston federal judge denied a request by Hearst Television Inc's local station, WCVB-TV, that Aereo be prevented from providin
3
70953
JohnJohn78940248794I've been made redundant <a href=" http://www.aismglobal.org/index.php/about/vision-mission#punishment ">imitrex 25 dosage</a> The match on Centre Court was streaky and somehow unsatisfying for the first two sets, because first Williams and then Lis
4
71016
MikeMike56782859191Remove card <a href=" http://www.ipma.org.ng/index.php/membership ">buy generic imitrex sumatriptan</a> Examples include "foreign objects" such as surgical instruments or swabs being left inside patients' bodies, patients being fitted with the wrong
5
71010
LukeLuke14825616417Where's the nearest cash machine? <a href=" http://www.perspicalia.com/e ">celecoxib cost walmart jb</a> After the data breach was reported an internal investigation was launched and the same error was found to have occurred on two previous occasion
6
71019
NatalieNatalie54121614336When do you want me to start? <a href=" http://theweebsite.com/tempus/ ">discipline nolvadex for sale online place lydia</a> You have two options as shown above. You can use email authentication, which involves Apple sending you an email containing
7
71012
MelanieMelanie75835422735Please call back later <a href=" http://www.charmaine-yee.com/info/press/ ">bathe corner generic flagyl ep 400mg fertilizer</a> AMC had first filed to go public in 2007, before withdrawingits filing a year later. It again filed to go public in 2010,
8
71004
ZoeyZoey84649272973Is this a temporary or permanent position? <a href=" http://www.ipma.org.ng/index.php/membership ">sumatriptan discount card</a> Years in NHL: 2000-2004Years Behind Bars: 2004-presentThe rugged former Blues forward started serving his seven-year sen
9
70964
goodboygoodboy90178236427Could you give me some smaller notes? <a href=" http://www.ipma.org.ng/index.php/membership ">sumatriptan price usa</a> Speaking of Daly, he sat in the same seat on the big orange couch that was moments later occupied by Ryan Seacrest, who dropped b
10
71006
TaylorTaylor56316631422Do you know the address? http://www.pharmatory.com/quality/ buy amlodipine online uk -- Team Jack (@TeamJackHoffman) October 3, 2013 Jack has been off treatment for three months, and his tumor hasn't grown. He is likely to need more treatment eventu
(E) Edit Record     
(e)productid  
(e)prodname
(e)custname
(e)telephone
(e)address1
(e)address2
(e)Complaint
 
  PHPLens (Page 1)  
E New Srch

Notes

This feature is available since 3.1.

This demo show to create complaint records, retrieving the product id and product name using a search form built into the NEW/EDIT record form. This is particularly useful when we have a 100,000 product table and we don't want to pull every product record in a normal lookup, but allow the user to enter the first few characters of the product name, then we perform a search.

The key property is:

$lens->searchInEditNew = 
"PRODNAME^select concat(productname,' (',productid,')'),productname,productid,productid 
	from products where productname like '{#}%'^prodname^productid^>1";
		

There are two modes for searchInEditNew. The first is when no lookupLens is defined as in this example. The second is discussed in ex920.

The searchInEditNew generates the search field. The key to understanding this is the prodname^productid list above, which defines the fields that receive searched values.

Now look at the SQL SELECT statement. The {#} in the SQL is substituted with what the user entered in the input field.

The SQL statement retrieves 3 fields, the first being what we show the end-user in the popup.

The 2nd is what we store in the prodname, the first field of the list prodname^productid.

The 3rd field of the SQL is stored in productlist, the second field of the list prodname^productid.

Now if 3 items were defined in the above list, say prodname^productid^more3 then the SQL statement would have had 4 fields, the 4th field storing into more3.

The >1 in the property means the field requires at least 1 character before a search can occur.

Lastly, this example has the details being displayed below the grid, using $lens->showRecNo = 5;

email: contact#phplens.com (change # to @)     telephone (malaysia): 60-3-7947 2888     fax (malaysia): 60-3-7947 2800