dmaxj Posted June 9, 2006 Posted June 9, 2006 I have two unrelated tables - table A and table B. I am trying to place a layout name from table A into table B using scripts. I have a calc field (gTableName) in table A that gets the LayoutTableName; I want to place the value of gTableName in to a field (tableName)in table B. I am trying to avoid a relationship, because table A is already related to another parent table. I get an error when trying to relate table B to table A, because table A is related to another parent table. Thanks
mz123 Posted June 10, 2006 Posted June 10, 2006 You can create another table occurrence. I think the "error" you are talking about is just asking you to create another table occurrence. If you have TableUno and TableDos, you create the following TableUno is related to TableDos TableUno is related to TableDos2 TableDos being another table occurence of TableDos, allowing you to have multiple relationships for the same table. Does that help at all?
bruceR Posted June 12, 2006 Posted June 12, 2006 I have two unrelated tables - table A and table B. I am trying to place a layout name from table A into table B using scripts. You're going to need to rephrase your question because it doesn't make any sense.
dmaxj Posted June 12, 2006 Author Posted June 12, 2006 You're going to need to rephrase your question because it doesn't make any sense. I don't see what is so unclear. Two tables exist with no relation to each other. I am triggering a script from table A. I have a global variable ($$currentTableName) in table A set to Get (LayoutTableName) ; I can see the correct value go into $$currentTableName by watching the Data Viewer. How could I get $$currentTableName into a field (tableName) in table B? Regards
Søren Dyhr Posted June 12, 2006 Posted June 12, 2006 A layout is always tied to a single TO (table occurance) - not shared! I am trying to avoid a relationship, because table A is already related to another parent table. I get an error when trying to relate table B to table A, because table A is related to another parent table. You get errors because you attempt to make a circular structure, which might work with Entity Relation Graps, but the Relational Graph found in filemaker is not an ER. The cure is to make another TO of one of the tables, I know too little of your dealings to know of which one. But you have certainly jumped light and easy over the reading in the migration foundation ...or flushed it out of your memory? --sd
dmaxj Posted June 12, 2006 Author Posted June 12, 2006 Dunno if this helps- but I think I solved my own problem. Apparently, I should mention that table A and table B are two separate files. AND it looks as if the scope of my global variable is only 'seen' in table A. Therefore, table B cannot see the global variable in table A. I would either have to move table B to the same file as table A OR make a relationship between table A and table B. Please advise... Regards
Fenton Posted June 12, 2006 Posted June 12, 2006 I don't quite get it, dmaxj. If you're just talking about a text value, that just happens to be a table's (TO's) name, then just go to a layout of table B and use Set Field.
dmaxj Posted June 12, 2006 Author Posted June 12, 2006 That's just it - I tried Set Field and Insert Calc Value to no avail. Recall that the tables are not related and are in two separate database files. Therefore, a a global variable for table A is not within the scope of table B... (unless there is something that I am missing) Is there some way to 'PUSH' the global variable from table A to the scope of table B? Or it looks as if I should just place table B in the same file as table A. Please advise. Regards
dmaxj Posted June 13, 2006 Author Posted June 13, 2006 Problem solved. I just figured that I would move the file to the same database file, so that the global variable set to the layout name would be within the same scope of both tables. Thanks for everyone's input. I am still making the transition from FM6 to FM8.
Recommended Posts
This topic is 6740 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now