too many fields, too many cards?
mark at maseurope.net
Wed Nov 29 20:35:58 CST 2006
On 30 Nov 2006, at 01:48, Timothy Miller wrote:
> I guess you're suggesting the stack could read from a custom
> property or a text file to fill in the fields in just one card,
> based on a unique identifier for each patient. That's not too much
> different from a database inquiry, if I understand you. I guess I
> could search faster that way, in theory, but otherwise, I don't see
> the advantage.
> My question:
> Have I understood the general idea here? Am I overlooking anything
> fundamental? Is it reasonable to leave well enough alone, as long
> as I can find stuff in stacks this large, when I need to?
I think you've understood the suggestion perfectly.
My own approach would be to store the data for each patient in an
customPropertySet, which is really an array (each one named the same
as the patient, maybe, and each key of which I'd name the same as the
field you're currently using), so to populate a single card stack:
on showPatient patientName
put the customProperties[patientName] of me into tPatientArray
repeat for each line K in the keys of tPatientArray
put tPatientArray[K] into fld K
and to store, after making changes
on storePatient patientName
repeat for with n = 1 to the number of flds
put fld n into patientArray[the short name of fld n]
set the customProperties[patientName] of me to patientArray
Something like this, anyway.
But if it's working well for you as it is, then?
More information about the use-livecode