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
71006
DominicDominic64639469761How much does the job pay? <a href=" http://www.adexsus.com/site2/?p=loans-lawton ">cash advance no id required no faxes or calling</a> However, since Syria's civil war began, Turkey has closed its border to many towns controlled by Democratic Union
2
71010
HenryHenry84995136837I came here to work <a href=" http://linuxrants.com/about-mike ">50 mg clomid success kt</a> Fabius, who spoke with his U.S. counterpart shortly before the agreement was announced, added that France would clarify its position based on the findings o
3
71012
MasonMason53484361004Where did you go to university? http://www.bjournal.com.br/gauthors.html order neurontin online no prescription On Thursday, Kim met Li in what was the highest-level talks between the two countries after their ties seemed to fray following Pyongyang
4
71061
LiamLiam94722603205I can't get through at the moment http://www.ohword.com/hw-help-online/ how can i do my book report Last month, Universal released a summary of the report,which concluded that there was no evidence to supportallegations of bribery. It was critical o
5
71078
MorganMorgan88866747197I can't get a signal <a href=" http://lawmt.com/best-rv-loan-rate/ ">need an advanced cash loan today</a> It’s an important reform — bad teachers should be let go. But a teacher who may have had a successful, two-decade-long teaching caree
6
71083
HunterHunter45949108807I was born in Australia but grew up in England http://www.cornwallfoodanddrink.co.uk/scientific-writing/ help in assignment writing "Now that we have new, key data, we believe this is mankind's historic leap into interstellar space," said Ed Stone,
7
71085
RachelRachel20909807448Do you have any exams coming up? http://weimar.edu/should-fathers-get-paternity-leave-from-work/ writing lab reports for chemistry Although Tacopina publicly questioned the Yankees’ medical handling of Rodriguez, Levine told the Daily New
8
71086
JoseJose76526994208I'm on work experience <a href=" http://www.videogameconsolelibrary.com/blog/?p=do-my-algebra-homework-for-me ">paper editing services</a> “If you want to boo whoever it is, our fans certainly have that right,” Ryan said. “To me, yeah
9
71089
TaylorTaylor54048855786Could I have , please? http://www.cornwallfoodanddrink.co.uk/scientific-writing/ buy uk essay online Universal Pictures recently re-negotiated rights to the novel - a modern retelling of the Cain and Abel story - from the Steinbeck estate. The studi
10
71090
AidenAiden35088170170Will I get paid for overtime? <a href=" http://www.jacquelot.com/merryloan#harm ">loans paid back in installments</a> Just another tax and spend idea. Steal from the corporations to give money to the losers. If government refuses to create a busines
(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