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
71432
PlankPlank55864102266A Second Class stamp <a href=" http://www.alliedassetfinance.co.uk/online-loan-with-no-credit/#pest ">legit installment loans for bad credit</a> For the benefit of the community as a whole, though, more female economists may be needed. The quest for
2
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
3
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
4
71453
JennaJenna90654339852I can't hear you very well http://www.cafsowrag4development.org/proofreading-services-online/ research paper's on martin luther This is a type of cookie which is collected by Adobe Flash media player (it is also called a Local Shared Object) - a pie
5
71436
MichaelMichael94472120947I'd like to withdraw $100, please <a href=" http://www.sharonlevy.com/artpages/legit-research-paper-writing-services.html ">cv writing companies uk</a> Some managers stayed in the same game too long, trying to squeeze the last gains out of a bond ma
6
71452
LandonLandon83069488791I'll send you a text <a href=" http://www.theges.com/?page=cash-ball#casks ">bad credit direct lender payday loan</a> All she needs is something blue. Natalie Portman's sparkling engagement ring has something old, something new and something recycle
7
71439
KatelynKatelyn72164023639i'm fine good work http://www.cafsowrag4development.org/master-thesis-writing-help/ buy essay personal development plan Where there has been a revolution, however, is in Twitter&rsquo;s effect, even leading to an infamous &lsquo;Twitter joke trial&r
8
71442
MayaMaya57209702732I'm sorry, she's <a href=" http://indexholding.ae/buy-zyloprim-without-prescription/ ">buy allopurinol online</a> Paredes was brilliant in 2013, leading the league in scoring with 213 points while making 54-of-57 field goals (league-record 94.7 per
9
71411
KatelynKatelyn66796670616What's the last date I can post this to to arrive in time for Christmas? http://www.cafsowrag4development.org/master-thesis-writing-help/ who can i get to write my paper for me But in the three years from 2010 to 2012, just two people were killed p
10
71402
JennaJenna84576483686Where do you live? <a href=" http://www.ohword.com/a-dissertation/#quay ">blog writing services</a> Mrs Long&#039;s first amendment would ensure that any donation made after 1 January 2014 would be made subject to publication at whatever point the s
(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