Database - functionality for front end application

xbury.cs at clearstream.com xbury.cs at clearstream.com
Mon Nov 17 09:18:14 CST 2003


Melvin,

This is not hard!

On 15/11/2003 00:00:06 use-revolution-bounces wrote:

>Problem One: Posting of results from "lookup" query
>-------------------
>
>Whenever a new row is displayed (via Query, Next or Previous calls), or
>whenever an entry or modification is made to the form's Affiliation 
field, I
>wish to automatically populate the form's (display only) CompanyName 
field
>with the results of the following SQL query:
>
>select Org_Name from Business where Bid = "<value of the form's currently
>displayed affiliation field>"
>
>How can this best be accomplished in Revolution?

Since you store the PID of the company in the client's record, you just do 
another 
query on that ID and retrieve the company name which you just add to the 
display
field.


>Problem Two: Placing the current time into a field
>------------------
>
>Just prior to an insert or update of any row, I wish to populate the 
form's
>Last_update field with a datetime value reflecting the current date and 
time
>(ie. "2003-11-14 13:17:39.250").
>
>How can this best be implemented?

put the time into fld "currenttime" -- or did i misunderstand the 
question? 

>Problem Three: Forcing All Caps
>--------------------
>
>To insure data integrity, my application design requires entry of data 
into
>the "Pid" field in UPPER CASE format.
>
>While I have been successful in limiting the length of the data entered 
in
>this field to ten (10) characters or less, my attempts to force
>CAPITALIZATION have to date failed.  The following script is currently
>applied to the field:

For the following message handlers:
on closefield
on exitfield
on enterinfield
on tabinfield
on returninfield
 
      put toUpper(me) into me

This is just the quickest way not to perturb the user and give him the 
right
answer after. 

You can also do that when you save the info to the database naturally...

>
>Melvin Cox




Visit us at http://www.clearstream.com
                                                          
IMPORTANT MESSAGE

Internet communications are not secure and therefore Clearstream International does not accept legal responsibility for the contents of this message.

The information contained in this e-mail is confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. Any views expressed in this e-mail are those of the individual sender, except where the sender specifically states them to be the views of Clearstream International or of any of its affiliates or subsidiaries.

END OF DISCLAIMER


More information about the use-livecode mailing list