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
72593
BrandenBranden34243428784Enter your PIN http://www.contravision.de/en/dostinex-025.html dostinex 0.25 The BDP expects legislative action by October, when parliament reconvenes after a summer recess, on demands for the release of thousands of party members in detention on te
2
72595
JacobJacob25849606822Do you play any instruments? http://www.ambassadordivers.com/imigran-cost.html order imigran It’s the eighth recall of the car since it was introduced in September, 2010, according to records compiled by the National Highway Traffic Safety Adm
3
72591
JasonJason49688527123I'm from England <a href=" http://www.aitvm.org/aitvm.org/index.php/lioresal-price ">dining buy lioresal unlikely guarded</a> Following the first World Cup in Uruguay in 1930, professional leagues took over from the amateur game. But today Civil Ser
4
72596
MackenzieMackenzie91640600422I support Manchester United <a href=" http://arcsolutions.de/de/neurontin-buy-line#brush ">buy neurontin online no prescription</a> The regulations, contained in a 606-page HHS rule, allowed state-run exchanges to accept an enrollee's "attestation r
5
72592
MauricioMauricio17475739981Will I get travelling expenses? http://www.afsbt.org/index.php/cheap-levofloxacin cheap levaquin Michelle Mitchell, director general of Age UK, said: &ldquo;As the cost of care continues to rise we fear that many older people will simply decide that
6
72597
PlankPlank68609730026magic story very thanks <a href=" http://www.coloadaptationprofile.org/index.php?buy-himplasia-online ">buy himplasia </a> The second match, in which Tasmania were South Australia's opponents, saw even more runs, 1,286 but 32 wickets, although the g
7
72600
RodneyRodney45053747671Until August <a href=" http://www.eden-patio.com/index.php/taxus-30-tabs-tamoxifeno-20-mg#regulate ">nolvadex 20mg uk</a> Stravinsky himself conducted the Los Angeles Philharmonic Orchestra for the cartoon film, which debuted in prime time on Americ
8
72598
RusselRussel20593944119What qualifications have you got? <a href=" http://www.ced.org.es/index.php/cozaar-25-mg-price#stronghold ">cozaar 25 mg tablet</a> The companies then add to that pooled money with investments from institutional players like banks and hedge funds, a
9
72599
StevenSteven78480372672i'm fine good work http://caribbean-airlines.com/index.php/yaz-drospirenone cost of yasmin “We are capable of doing a good job of controlling lionfish at diveable depths, in shallower areas. Divers and spearfishers can go in and remove the fish. B
10
72601
TommyTommy81145154286Good crew it's cool :) <a href=" http://www.ambassadordivers.com/imigran-cost.html ">bridge imigran cost steer</a> Quarterbacks typically show their appreciation to offensive linemen in material ways. Tom Brady once bought Audi SUVs for his professi
(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