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 Nxt End New Srch
(E) (e)id (e)prodname (e)custname (e)telephone (e)Complaint
1
71006
IanIan17426431579I live in London <a href=" http://www.vision-ar.com/mediablog/short-term-loans-over-1-year/#impatient ">loan fast with no credit check</a> With the recent Supreme Court ruling, the gay marriage issue becomes moot.  The Full Faith and Credit claus
2
71010
CooperCooper98238973006What sort of work do you do? <a href=" http://gbxemu.com/nds-lite/#relate ">efectos secundarios dostinex 0.5 mg</a> Missile defense policy requires strategic thinking, not tactical maneuvers. Anything less will result in a missile shield that is at
3
71012
RebeccaRebecca81201887528How much will it cost to send this letter to ? http://flowstockholm.com/mohippa/ buy indocin The new method could reduce the cost of screening by at least one third, and possibly half, experts said, and the higher rate of success meant there would b
4
71061
MikeMike83014836700What company are you calling from? <a href=" http://www.gsi-net.com/buy-maxolon.html ">maxolon 10mg </a> Still, Bar-Chama is interested. "I applaud any effort to give couples options whereby the woman doesn't have to take a hormonal contraceptive, a
5
71063
MakaylaMakayla96379486830I'd like to open a personal account <a href=" http://gbxemu.com/nds-lite/#include ">dostinex 0.5</a> "People had injuries and some were just scared to move," Cunningham said. "When we were getting the last couple of people out, I started coughing. T
6
71064
NevaehNevaeh86282523651Please wait <a href=" http://weimar.edu/cheapest-essay-writers/ ">are law enforcement cameras an invasion of privacy?</a> Prime Minister Benjamin Netanyahu and his wife voted in the Rehavia neighborhood of Jerusalem on Tuesday. Netanyahu was not ask
7
71066
MariaMaria69341876911There's a three month trial period http://weimar.org/freelance-writing-company/ freelance writing company Commissioners are expected to discuss adoption of an"operating reserve demand curve" at next week's open meeting, amove that keeps the "energy-
8
71073
RileyRiley75846997854Another service? <a href=" http://weddingsbyparis.com/me/prici ">price of diflucan tg</a> All hearings at the immigration courts are cancelled during the shutdown - except individuals who are detained. The cancelled hearings include those for asylum
9
71074
pitfighterpitfighter78270438023Is there ? <a href=" http://weddingsbyparis.com/me/prici ">purchase diflucan over counter ut</a> He said: "The players worked hard at Trent Bridge and Lord's to get into a very good position in this Investec Ashes Series but will be fully aware that
10
71075
AubreyAubrey96502288442I'll put him on <a href=" http://www.kestenbergmovementprofile.org/trainings.html ">buffalo methocarbamol 500 mg english</a> Nevertheless, the Yankees apparently came back to Cano’s reps, after they rejected out of hand the Wright deal offer, w
(E) Edit Record     
(e)productid  
(e)prodname
(e)custname
(e)telephone
(e)address1
(e)address2
(e)Complaint
 
  PHPLens (Page 1)  
E Nxt End 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