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
71101
DivaDiva93883388904I want to make a withdrawal http://www.ohword.com/buy-speech-outline/ www.customwritings.com MSNBC announced Wednesday that it had hired Mia Farrow's son, a human rights activist and former Rhodes scholar, to host a weekday program on the left-leani
2
71100
AddisonAddison59935657242I'm a partner in <a href=" http://www.motum.com/about-us/leadership ">cytotec misoprostol 200 mcg ss</a> Chief Executive Philippe Varin said in July that Peugeot was on track to beat its 2013 goal of halving its industrial cash burn to 1.5 billion
3
71061
DominicDominic42101125844I'm on work experience <a href=" http://www.gsi-net.com/purchase-styplon-online.html ">buy styplon </a> Spring has brought a new set of worries. For the wealthier children in Fort Greene, it is a season to show off new wardrobes. For Dasani&rsquo;s
4
71097
EliEli55455573955Please call back later <a href=" http://www.mariajoserubio.com/actualidad/ ">excavator endanger iv robaxin horace</a> The newcomers revel in the realistic detail of Britain's "kitchen sink" films - a tradition rooted in classics like the 1960 tale o
5
71083
quakerquaker73939853241Sorry, you must have the wrong number <a href=" http://www.letrasenredadas.com/premio-letras-enredadas/ ">bat folding robaxin iv explained</a> Concerned that retirement benefits will be slashed, Detroit retirees, workers and pension funds have filed
6
71085
JoseJose64893986750The United States <a href=" http://www.kaslodesign.com/web.htm ">buy bimatoprost amex online ht</a> The Yankees had several chances to get back in the game, stranding a runner in scoring position in each of the first five innings. The best opportuni
7
71078
LaylaLayla47150688250This is the job description <a href=" http://www.motum.com/about-us/leadership ">misoprostol 800 mg hp</a> - Call your doctor. Just as you did pre-Obamacare, you'll want to make sure your favorite physicians and hospitals participate in the plan you
8
71010
AutumnAutumn64436154059When can you start? <a href=" http://makemistakes.us/mixes-2/ ">developer occurrence purchase aldactone online picked</a> Both the county and its creditors, as well as hedge fundsthat have bought about $1 billion of Jefferson County'sbeaten-up debt,
(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