Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi All,

I have 2 related table.

when in layout 1, i need to go to related record in layout 2

When I write the script, I select layout 1, but table 2 is not in the list when selecting show record using layout.

any suggestions?

Posted

Hi Steve,

Here is the attached as requested.

I refer to the Customer_Aircraft TBL and the Balance Sheet TBL.

Balance Sheet is not in the list to select as "Show record using layout"

image.png.da63bcd6a5638f6b1d8cc677ecd1a04b.png

image.png.b5b84c7f44034c711140d2a1f2e333dc.png

Posted

Agreed, you shoukd select balance sheet. What I don't follow is the keys you're using to relate your tables. I would have expected customer to relate to aircraft by customer Id. What is the value in registration and why is it a key?

Posted (edited)

Hi,

Most of my tables relate to a registration number which must be a text field. I did not select the ID if the aircraft to be my key throughout the DB.

and on the layout side, when using the balance sheet as related record, I dont have Customer_Aircraft in the list either.

image.png.eff33e77fc1612cb7e7846d915bf04f4.png

 

Maybe, my relationship table will give clarity for my reason to Registration as a key.

Could this be part of my problem i am having?

image.thumb.png.a12d6d6ca1d208c28fdd0d19b9b3f0c1.png

Edited by Gismo12
Posted

You should not use registration as a key if it's a value that you have no control over and if it is not unique.

I see many relationships in your system that are questionable:

  • You're relating Kit>KitItems by Description! Should be by KitId
  • ATAChapter? Is that a field you control?

You didn't answer where Registration is created. By your system? What is it? (auto-enter serial?). Why do you have a PrimaryKey field if you don't use it for relationships?

Also, before you go much further, I would strongly suggest adopting a convention for the Relationship Graph. I prefer Anchor-Buoy, but you need to do something. This will not scale well.

  • Like 2
Posted

Hi,

I am changing all my relationships to a unique key.

The registration is a manual field created by the user, not a auto number. it is a text field.

But after changing all my tables to relate to a primary key, will i be able to see the table when I select in the list for show record using layout?

Posted
Quote

The registration is a manual field created by the user, not a auto number. it is a text field.

Never use this type of value as a relationship key!

Let's see your new relationship graph after you refactor the relationships. Also, why do you name the Aircraft table Customer_Aircraft? I find that confusing. It sounds like a join table, storing data about the many aircraft a customer owns and attributes of that ownership. I'd change that table to simply, Aircraft.

Please study up on Anchor-Buoy! 

 

  • Like 1
  • 2 weeks later...
Posted

Hi,

I used the name Customer_Aircraft as I already have a Customer Tbls and an aircraft Tbl which stores specific Aircraft detail.

In the Customer_Aircraft TBL I Can Select the Customer and the Aircraft detail so yes you are correct, this is a it is pretty much a join table storing all the aircraft secondary detail per customer.

Below is my new relationship with ID's

image.png.f1f1ca7b4defe5e503dd8cde9d95bf91.png

I still can not see my Customer_Aicraft tbl in Show current record using layout when I select Balance sheet  as get related record from.

image.png.566fa6de113130af73c1298d7491afc1.png

Posted

So, a customer can have many Aircraft?

If Customer>Customer_AirCraft<Aircraft Spec is true, then you should have two foreign keys in Customer_Aircraft: the CustomerId and the AircraftId. 

What is the primary key in the Aircraft_Spec table? That should be what relates from Aircraft_Spec>Customer_AirCraft. 

Posted

Hi,

The 2 layouts in question here is the Balance Sheet layout and the Customer_Aircraft layout.

Not referring to the aircraft spec or the customer layout.

I need to open the balance sheet from the Customer_Aircraft Layout

Customer_Aircraft Layout has 2 primary keys, Customer ID which record the customer and the Customer_Aircraft ID which refers to the Aircraft ID.

So when I write the script to open the Balance sheet and show records from the Customer_Aircraft layout, this layout is not available in the list to select. It only gives me the option of Balance sheet and balance sheet Re

  • 4 weeks later...
Posted
On 12/12/2018 at 9:27 AM, Gismo12 said:

Hi,

The 2 layouts in question here is the Balance Sheet layout and the Customer_Aircraft layout.

Not referring to the aircraft spec or the customer layout.

I need to open the balance sheet from the Customer_Aircraft Layout

Customer_Aircraft Layout has 2 primary keys, Customer ID which record the customer and the Customer_Aircraft ID which refers to the Aircraft ID.

So when I write the script to open the Balance sheet and show records from the Customer_Aircraft layout, this layout is not available in the list to select. It only gives me the option of Balance sheet and balance sheet Re

Hi All,

Any proposals for above request? would really appreciate it as I just dont know which way to go from here. My Customer_Aircraft layout is not available when usen the Balance sheet as related record

Posted
16 minutes ago, Gismo12 said:

My Customer_Aircraft layout is not available when usen the Balance sheet as related record

The Customer_Aircraft layout  is not available because it is not a layout of the same base table as Balance sheet.

Every layout is defined to show records from a specific table occurrence on your relationships graph. And every table occurrence on your relationships graph belongs to one of the base tables defined in your file under the Tables tab. When you want to go to related record from a specific table occurrence, only layouts belonging to table occurrences of the same base table are available.

  • Like 1
Posted

Oh okay now I understand.

So when I am on a certain layout and I want to open a different layout but go to the same customer, how do I accomplish this?

Ah, sorry guys, found the solution.

I was trying to open a layout from different tables references

 

This topic is 2147 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
×
×
  • Create New...

Important Information

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