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
71453
BlakeBlake42711372768Incorrect PIN <a href=" http://indexholding.ae/buy-zerit-online/ ">zerit xr</a> Everything to play for in Group E, other than for Steaua Bucharest who have been eliminated from Europe. The Romanians, though, could have some say in the final standing
2
71411
fifa55fifa5583027128713I'd like to send this to <a href=" http://www.pensionfreedom.ie/cash-advance-twinsburg-ohio ">computer financing</a> A senior House Republican aide said that narrative goes likethis: the House passes a debt limit bill with a laundry list ofRepublic
3
71432
HaileyHailey28238609224Could you tell me my balance, please? http://www.warwickhughes.com/blog/?p=buy-a-business-plan-online write english paper for me cheap "Despite the intensifying political debate, we will maintain our operational and financial discipline, to enable u
4
71436
IsaiahIsaiah40651805324I wanted to live abroad <a href=" http://weimar.edu/cheapest-essay-writers/ ">solve paper writing website hat</a> One decorative curiosity common throughout Alsace is the questionable, 1970s-themed colours the locals have chosen to paint their other
5
71439
KayleeKaylee36545004311Withdraw cash <a href=" http://barcelonaconsensus.org/writing-essays-online-for-money/ ">help writing a college paper</a> First held in the 13th Century, it is one of the largest and oldest travelling fairs in Europe. Legend has it the festivities b
6
71442
MackenzieMackenzie89117789711I'm not sure <a href=" http://weimar.edu/cheapest-essay-writers/ ">checking clamour best writing paper for 10$ intermediate receipt</a> The government says its intelligence agencies act within the law and that the Snowden leaks, which revealed U.S.
7
71450
MadelineMadeline79962953776Good crew it's cool :) <a href=" http://www.vision-ar.com/mediablog/credit-score-personal/#units ">commercial finance lenders</a> "Restricting coverage could hinder a timely and accurate diagnosis," said Dr. Daniel Skovronsky, president and chief ex
8
71452
MatthewMatthew98827206789I'm not sure http://www.sharonlevy.com/artpages/do-my-homework-for-cash.html article writer Price controls ultimately end up stifling both consumer choice and growth. Labour is reverting to type, but a type we have not seen since Margaret Thatcher e
9
71402
PaytonPayton18503178503I'd like to open a business account <a href=" http://www.theges.com/?page=can-i-get-a-payday-loan-with-a-savings-account#claim ">cash loans online instant</a> I&#8217;m attending a meeting on complexity at the Santa Fe Institute, and today there was
10
71444
RebeccaRebecca82200003254How much will it cost to send this letter to ? http://weimar.org/technical-writing-service/ best writing essay &#x93;I would not expect that,&#x94; said Carol Johnson, a National Park Service spokeswoman for National Mall and Memorial Parks. &#x93;A
(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