AnsweredAssumed Answered

SetField Script Problem

Question asked by retailmonica on Oct 14, 2010
Latest reply on Oct 15, 2010 by etripoli


SetField Script Problem


Hi all-

I'm having a scripting error, and I can't figure out why.  I'm trying to make a log of all files that are downloaded via a menu.  This is one part of my giant IF statement, and I was wondering WHY I can get the log table (CT) to create a record IF there IS ALREADY a record with my Key in it, but not if there is no key in it.

I'm attaching a screenshot of my script, highlighting the part that isn't working correctly.

I want it to: copy the RECORD ID (which is attached to people, and this is the Primary Key for table Applicants) to the new table (CT), so that way we can see who the download was for.

Results are as follows:

If the log table doesn't have a record already for RECORD ID that I am trying to set, then it asks me for a number.  It doesn't set the number.  If the RECORD ID is already found in the table, then it makes the new record, attaching the RECORD ID, no questions asked.

I have tried using a global field, which works well for making new records (as said above), but for some reason it won't attach the RECORD ID field if there isn't already this record here.

I've changed this script a thousand and one times, so it could be something as simple as something is out of order.  Anyways, any thoughts?