Alan, I'm a little late to this thread and I don't want to muddy the waters but I find working with numeric pointers to fields helpful in these instances. What's a 'numeric pointer'? I do it very simply: (table number * 1000)+field number. This yields a unique value for each field and can be managed with 3 or 4 simple methods. I refer to the value as a 'fieldCode'. fieldCode = (table number * 1000)+field number table number = fieldCode\1000 // longint division field number = fieldCode%1000 fieldPointer = Field(fieldCode\1000; fieldCode%1000)
I can't take credit for making it up and I don't recall where I got the idea from. If you are really worried about a table with more than 1000 fields use 10k as the multiplier. This eliminates the worry about breaking code because a name changes while retaining an easy way to identify them. There's no tremendous downside to storing them as text, btw. It also means you can represent an entire structure in a single longint array. On Fri, May 18, 2018 at 7:05 AM Alan Tilson via 4D_Tech < [email protected]> wrote: > Hello everyone and thank you for your thoughts on this, > > First I don't ever expect to compile our system since working on it live is > a fundamental requirement of our approach, unless that changes of course... > > Secondly I'm actually using dynamic field names since I am using the field > names from the sister table which are by design exactly the same as their > sister field in the primary table. So I am taking the field name from the > sister table and creating a pointer to it's sister (or twin?) field in the > primary table. As long as I keep both field names the same it should work. > > Hard coding the link between the various pairs would certainly work and > should be the fastest. However, in this case I'm rather attached to my > generic code where the only thing I have to do to add a field to the > mirroring is to add it to the sister table. > -- Kirk Brooks San Francisco, CA ======================= *We go vote - they go home* ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

