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
72409
OdellOdell30067851803this is be cool 8) http://greenwoodsstatebank.com/personal-loans/ investment real estate loan rates AstraZeneca previously described the questioning of its sales representative as a local police matter that did not appear to be directly linked to al
2
72410
MarshallMarshall38799916727I'd like to take the job http://greenwoodsstatebank.com/personal-loans/ instant cash loans no interest But some important products such as semiconductormanufacturing equipment and certain types of memory chips wereleft off the list, as well many typ
3
72400
MauroMauro33901217113How do I get an outside line? <a href=" http://www.cleanenergyconsultancy.co.uk/training/workshops/ ">wrap medium 7.5mg zopiclone bag discreet</a> At a recent shareholders' meeting in Munich, the two wereasked pointedly about their relationship. Loe
4
72405
DarinDarin68075708039How do you do? http://partitolotteria.org/chi-siamo/ purch
5
72404
LeandroLeandro20375452774I'm from England <a href=" http://afritest.net/index.php/test-issues ">snow betamethasone topical cream unique rest</a> &#8220;When I look at the Republican Party these days and who the quote &#8216;leaders&#8217; are, I&#8217;m not particularly com
6
72412
DiegoDiego49977594423Through friends http://www.poly.ee/polygon/ purchase bimatoprost without a rx online "For her and the other two students, it's just a personal relationship with folks we know who have been deported," Abdollahi said. "We want the Obama administ
7
72401
LinwoodLinwood84480564613What do you study? http://greenwoodsstatebank.com/personal-loans/ florida hard loan money In the House of Representatives, no similar hearings have been scheduled, but a coalition of Democrats including Rep. Luis Gutierrez, D-Ill., are also fighting
8
72403
TyroneTyrone60585331924We've got a joint account <a href=" http://www.wadebridgefoodbank.org/storehouse-shop/#fetched ">purchase glucophage</a> Prosecutor Rich Mantei told the judge that Zimmerman "had enough in his heart to stop his trip to the grocery store…to get
9
72411
GarthGarth86813449403How much notice do you have to give? http://greenwoodsstatebank.com/personal-loans/ really poor credit payday loans Another poll, done by the Associated Press in the eighth day of the partial shutdown mirrored the Fox News Poll results.ÂÂÃ
10
72402
KayleeKaylee37199731991Which year are you in? <a href=" http://www.hollandpompgroep.nl/atex ">separate zopiclone online order regulate sneeze</a> The data could make policymakers at the Fed more confident about recent assertions that the economy was strengthening quickly
(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