Mike -
Here's one way you would do that in version 7.6:
Using a small example,
Column A - user enters the abbreviation for the medication
Columns B & C - additional columns to be populated and possibly
changed
Place all three fields on the form as DBEdits.
Add a ComponentID to each field that uniquely describes each field; I
usually name the ComponentID to be the same as the column name.
In the On Exit EEP from Column A, create this custom code:
--get the value the user typed into the field for ColumnA
GETPROPERTY ColumnA TEXTVALUE 'vMedication'
--Lookup the other column values from the lookup table
SELECT ColumnB, ColumnC into vColumnB v1,vColumnC v2 +
FROM MedicationTable WHERE MedicationColumn = .vMedication
--Update the values displayed in Column B & C
PROPERTY ColumnB TEXTVALUE .vColumnB
PROPERTY ColumnC TEXTVALUE .vColumnC
Now the user can tab to the appropriate column and make whatever changes are
necessary.
One thing to be aware of - the GETPROPERTY ... TEXTVALUE will return a TEXT
variable so you may need an interim variable to convert to date, currency,
integer, etc.
SET V vColumnBInteger INTEGER = NULL
SET V vColumnBInteger = (FLOAT(.vColumnB)) or something similar ...
Have fun!
Sami
____________________________
Sami Aaron
Software Management Specialists
913-915-1971
[EMAIL PROTECTED]
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Michael
Sinclair
Sent: Monday, April 14, 2008 8:17 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Forms in Rbase 6.5 vs 7.6
Is there a way, from within the form, to allow the fields to be filled
with data (from a lookup table) and still allow the user to change the data?
In my scenario, the user enters an abbreviation for a medication, and
the form populates all of the fields with the most common data
associated with that medication.
Most of the time, no changes are need. However, there are times, when
only one of the fields need to be changed. In Rbase 6.5, the data entry
in this scenario was lighting fast...the user would type in some 3
letter abbreviation (which would populate all of the fields from the
lookup table) and then tab to the field that needed to be changed, and
change it. All the other fields that had data would be left unchanged.
Can that be done in ver 7.6?
Mike
A. Razzak Memon wrote:
> At 07:04 PM 4/14/2008, Michael Sinclair wrote:
>
>> In Rbase for Windows ver 6.5, when creating a form, there is an
>> option for each field that has been assigned a look up value that
>> asks whether or not I want the user to be allowed to change the
>> value in the field. Is there an equivalent setting in Rbase 7.6
>> forms? If so, I must be blind, but I can't find it!
>
> Mike,
>
> Technically, all lookup variables defined in 7.x or Turbo V-8 for
> Windows are true lookups and will not change, even if you try to
> overwrite them.
>
> However, you have two options: make them Read-Only, or un-check the
> option for Tab Stop.
>
> To assign the "Read Only" property to DB or Variable Edit controls,
> you may double-click or use [F11] key on the control and then check
> the option for Read Only.
>
> And, that's all there is to it!
>
> You may also take a look at the sample forms included with RRBYW14
> to demonstrate the use of such feature.
>
> Very Best R:egards,
>
> Razzak.
>
>
>
>