AnsweredAssumed Answered

script with variable table name and fixed field name

Question asked by margotjacqz on May 3, 2011
Latest reply on May 5, 2011 by margotjacqz


script with variable table name and fixed field name


What i want to do is easy in separate hard coded scripts, but am trying to understand if it can be done in one, to allow for additional tables etc.

Tables: People, Company, Projects, ToDo. Each has a field FindSelect which is a check box for short term use in reviw and subsorting. After a Find, I may review the found set and check FindSelect to create a new individualized subset which might be used for any number of things.  In one session this might happen several times for different projects. I have a button that will clear all checked boxes in the active category only- That is I'd prefer not to clear checkboxes globally.

GetAllRecords and SetField [tablename::FindSelect; value:" " ] 

But of course I have to specify the tablename and therefore have either multiple scripts or one with many IFs.  

So, my question: Wondering how to pass a variable table name into the SetField statement.

Have found that Get(ActiveFieldTableName)::FindSelect does not work, but it really ought to. <s> And, no certainty on what will be the active field of course. There is something else I am sure, based on context I expect, but it's too subtle for me.