Index on Multifields
9 messages in this thread
How does indexing work with Multiple response fields. I want my Address.sbf
to have a multiple response field I will call "categories" with 10 possible
entries, so that I can select records based on where we know the people
from, ie school, church, business, wifes friend, husbands friend, this
group, that group etc.. I will not know in advance what these fields will
be so I will need to see a list of all of them preferably in a pop up pick
list. Will Superbase allow me to do this? In general how do you go about
pop up pick lists for items already in an indexed field so that you can be
sure that the spelling will match similar entries?
Russ
Russ,
I'm not employed with Precision, but I have been mucking about with
Superbase for a few years on the Amiga.
I don't think multifield indices are 'aware' of anything other than the
first entry in the field. I say this because I've never been able to get
the report generator in Superbase to recognize the existence of entries
'above' the first one.
So far as popup lists are concerned, have you tried requestor type 20? It's
syntax is REQUEST "Line1","Line2",20,Resp%,TargetField,len%,Field2,
Field3,Field4. Line1 and Line2 are explanatory text. Resp% holds the
response code (1=OKAY clicked, or a selection double clicked, 0=CANCEL
clicked), TargetField (which can also be a variable) is where the result
gets put, Field2 is what you pick and Field3 and Field4 are additional
fields from the same file as Field2 which let you 'explain' the Field2
values.
I use this type of request a lot when I want to make pick lists. One thing
that's not terribly clear in the manuals: once the requester appears, you
can enter a partial key values in the entry box, hit return, and have the
requestor move the pick list to the nearest matching key value.
– Mark
Mark,
Thanks or the very helpful comments and Syntax. That is just the kind of
response I was hoping for! I will have to try it soon. I figured that there
was a way to do it but wading thru the documents is a real deterent. I
wonder why superbase doesnt have 1.online help and 2.functions available in
the expression builders? ********* *** = = @—0 0
_\
__
\/ >>>>TTFN! Russ
Russ,
Probably because the market for Superbase isn't big enough to support that
kind of development yet. That's why I really hope their messy dos version
(actually windows, but who cares?) takes off — it'll help bootstrap what
they're doing on the Amiga.
– Mark
The multiple response field was basically included for raw database use,
but is not able to be read by any of the functions such as filters or
querys. The best way to handle these responses is indeed a separate file
which is accessed by a request 20. With this method you can point-and-click
to whichever input you choose.
-Michael
I second the motion, use a table file of valid entries for the field,
validate validate the field with a LOOKUP using requestor 20. I have
several applications running that use this feature including a couple of
business applications installed in offices, and the users love it. They
can also edit the lookuptable/file as their needs change.
Michael, Unfortunately, keeping the stuff in a separate file makes it a
little tricky to keep it in order (i.e., in a multiple field, entry 3
always follows entry 2, but in a separate file you need to keep some tricky
DML logic in the loop) – Mark
Mark,
Actually, you can reorder the file so that the fields are sequencial by
setting the field order, then querying to a new file. Unless you need the
field order to be dynamic this will work for keeping the fields straight.
–Michael
Except, unfortunately, the query function sets the field size of the
Superbase file it creates based on the width of the FIRST entry it creates
for each field…which is weird at best and a bug at worst. Do you know if
that was fixed in the upcoming upgrade?
– Mark