AnsweredAssumed Answered

Table References as Variables

Question asked by Vinny on May 17, 2011
Latest reply on May 18, 2011 by philmodjunk

Title

Table References as Variables

Post

I am sharing sub tables amongst several main tables.  For example, the "accounts" table and the "contacts" table both relate to a table of "notes" by way of foreign keys as follows:

Accounts:Account ID->Notes:Account ID_FK

Contacts:Contact ID->Notes:Contact ID_FK

This way, both my accounts and contacts tables can have related notes.

Now, I want to write generic scripts that can be used by both the Contacts & Accounts tables.  However, I am finding that I cannot do that because while in a layout based on the accounts table, all my references to a field in the Notes table must be per the relationship (i.e. Accounts::Account Notes::Note ID, or, contacts::contacts notes::Note ID).  This is making it complicated to write generic scripts.

Any ideas?  Was this clear enough?

I realize that if the script moves to a layout based on the notes, that the fieldnames can remain generic.  I was just hoping I could stay on the main table's layout.  Also, FYI, the script is being called from a portal row.

Outcomes