This content has been marked as final. Show 4 replies
> if gDatabase > 0 then
> repeat with i = 1 to gDatabase.count
First you treat gDatabase as if it's a boolean, or perhaps an integer,
but on the very next line you treat it as a list. Before you can solve
any other problems you need to address this inconsistency. Perhaps:
if listP(gDatabase) then
nEntries = count(gDatabase)
repeat with i = 1 to nEntries
Also you are setting record to gDataBase rather than to an item within it.
Also if record is a propList I would use the square bracket syntax rather than dot syntax which will produce an error if the property isn't found.
if NOT ( getFirstName = record[#Firstname] ) then
If it's not working at run time then perhaps gDataBase isn't initiating properly. If it's a global it would persist while you were working in Director so might work as expected if initiated already.