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
72398
DwightDwight92156090968My battery's about to run out http://greenwoodsstatebank.com/personal-loans/ christian credit consolidation It was the second time in a day Leathers caused a headache for the Weiner campaign.  Earlier Tuesday, Leathers was spotted outside of his
2
72397
SamualSamual40823237026What's your number? https://www.freshspring.co.uk/accessibility/ buy zyban n rx Several U.N. diplomats told Reuters they were surprised by Bashir's request to come to the United States. One Latin American ambassador said it was a "travesty of int
3
72389
SterlingSterling90615225590What are the hours of work? http://www.emprendepyme.net/coaching zithromax how supplied The 62-year-old talk show psychologist, whose full name is Dr. Phil McGraw, often has themes and topics for his upcoming shows tweeted out to fans an
4
72395
DexterDexter48709275463We're at university together http://www.cosmo-fragrances.com/home where to buy nolvadex cycle SEOUL, South Korea - Asiana announced Monday that it will sue a San Francisco TV station that it said damaged the airline's reputation by using bogus and r
5
72391
HeathHeath78516920821Who do you work for? <a href=" http://archery.ie/site/index.php/calendar/#germany ">10mg amitriptyline</a> "Had we invested that money here in California, it would have had a multiplying effect because it would not only have given thousands of Calif
6
72392
RigobertoRigoberto56165571285A staff restaurant http://www.cosmo-fragrances.com/home tamoxifen price ireland “I think you have to at this point,” Cashman said. “Nothing’s been handed down, so I think you have to. We expected to have him back at this point. W
7
72393
GreenwoodGreenwood55363840493Could you tell me the dialing code for ? <a href=" http://www.afceco.org/printable-prilosec-coupons#beasts ">prilosec coupons printable</a> There are some in the Mets organization who are also amped up, trying to push to have Harvey named the starte
8
72394
OliverOliver61579498762It's OK http://www.salomoncontemporary.com/press.htm wellbutrin sr 150mg and weight loss The digs uncovered equipment that was used more than 40,000 years ago to make hides more lustrous and water resistant. Boffins previously believed that the t
9
72396
RayfordRayford67722554872About a year http://www.cosmo-fragrances.com/home generic tamoxifen price Amid questions about how the deal would be enforced should Syria fail to live up to its obligations, Obama said the United States would work with Russia, Britain, France and t
10
72390
GarrettGarrett31568258397Could I have a statement, please? http://greenwoodsstatebank.com/personal-loans/ buy computer on credit "In many cases, they give you a figure which they deem to bemeaningless from an internal management standpoint," Papa said."They just give it for
(E) New 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