Jump to content

table name into unrelated table


This topic is 5651 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 5651 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.