Logic confusion (Lookup)
David Thompson
dthmpsn1 at uiuc.edu
Tue Mar 4 14:57:10 PST 2008
>Yes, I can see my logic is messed up here, that is why I am posting
>this. IF the arraybuild is focused on the calendar DB and within that
>arraybuild I try to use lookup and info("databasename") points to the
>current DB (Contacts DB) then .. how should I look at this?
>
>lookup(info("databasename"),(First+" "+Last),(array(strip
>(CalContactname),1," ") +" "+array(strip(CalContactname),2,"
>")),"Phone1","",0),"")
The second parameter in a lookup( is used to name
the field that will be used as the key field. It
can be a formula, but the result of that formula
must be the name of the field. In this case, it
looks like the formula you are using for that
parameter (First+" "+Last) will produce the name
of one of your contacts, rather than the name of
a field.
The third parameter should be the key value that
you want to match against the values in the key
field. The formula you are using here
(array(strip(CalContactname),1," ") +" "
+array(strip(CalContactname),2," "))
looks like it will produce the full name of a
contact. If that is what you want to use for the
key value, then you will need to have a field
that contains the full names of your contacts, so
that you can use that field as your key field.
Your key field needs to be a single field. You
can't do it with separate First and Last fields.
Dave
More information about the Qna
mailing list