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.

E New Srch
(E) (e)id (e)prodname (e)custname (e)telephone (e)Complaint
IsabellaIsabella51161713184Very interesting tale <a href=" ">roxithromycin 300mg</a> But the project raises questions about immigrant detainees having access to government-funded representation, says Jessica Vaughan, director of polic
RickyRicky82516734931Get a job <a href=" ">online cash advances payday loans</a> The monitors said charcoal traders in Dubai informed them that the impounded shipment eventually reached the market. Some 10,00
SavannahSavannah38688628116Can I call you back? <a href=" ">buy essay business</a> She sang on the hit television music show 6.5 Special leading to her own programme, Be My Guest. This ran for four series and attempted
JohnJohn11328987523I'd like to send this parcel to <a href=" ">10th grade book report directions</a> Elsewhere in the market Apple is still very much second to Android, though it also has the hig
MariaMaria73999701446I'd like to send this parcel to <a href=" ">pay to write my term paper</a> &#8220;Due to a critical loss of brain and organ function, life support was withdrawn today,&#8221; the statem
StephanieStephanie73080454321I'd like to open a business account <a href=" ">get a fast loan same day you apply</a> This is a type of cookie which is collected by Adobe Flash media player (it is also called a Local Shared Object) - a p
LuisLuis74318942093What sort of work do you do? <a href=" ">instant bank loans</a> At the core of discussions is the political future of the Muslim Brotherhood and its Islamist allies. The Brotherhood says it
JocelynJocelyn59271362497Another year <a href=" ">reflective essay writing</a> Mr Norris had &ldquo;retired&rdquo; after leaving HL at just 36. &ldquo;It was a great apprenticeship but being part of a big listed business a
MariaMaria60172268320We need someone with qualifications <a href=" ">college application essay community service</a> “I’m not afraid of the reality,” Cashman said. “None of the people here are afr
NathanNathan48913146846I'd like to change some money <a href=" ">ritemypaper</a> Breaking with tradition in the Islamic Republic of Iran, the newly inaugurated president invited international guests f
(E) Edit Record     
  PHPLens (Page 1)  
E New Srch


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: (change # to @)     telephone (malaysia): 60-3-7947 2888     fax (malaysia): 60-3-7947 2800