Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to go to same ID in another table

Featured Replies

I have a ContactsID in my Contacts Table and a ContactsID in my Orders Tables. What I want to be able to do is click on a button on my Contacts layout and go that ContactID in my Orders layout.

Thank you,

Carl

Presumably the two tables are related, so use Go to Related Record.

  • Author

Hi Fitch,

I'm on my Contact layout and I set up the "Go To Related Record so it reads.

Get related record from: Contacts

Show record using layout: The layout I want in the Invoice table is not shown. None of the Invoice layouts are.

I have a feeling that's not good!

Carl

I'm on my Contact layout and I set up the "Go To Related Record so it reads.

Get related record from: Contacts [color:blue]< --- change that to Invoices :wink2:

"get my related record from my Invoices table occurrence"

  • Author

Hi LaRetta,

Ok I changed it so if I’m in my contacts layout and call the script the script is,

Get related record from: Invoices

Show Record using layout: Invoice Entry

Show only related records: is checked

Match current record only: is checked

Nothing happens. Is there some other part of the script that is needed?

Carl

Have you made sure, in your graph, that they are joined on ContactID? And have you made sure you have a record in your Invoice table which has a ContactID field with this current contact's ID in it?

If you still can't figure it out, it might be easier to just zip and attach your file. The problem will be something simple; not to worry, we'll figure it out. :wink2:

I hope this is not too obvious, but does a related record exist?

  • Author

Hi

The relationships graph shows the Contacts table and Invoices Table are related “=” by both ContactID and CustomerID”.

The layouts are Contacts Entry::Contacts and Invoice Entry::Invoices.

The ContactId in the Contacts file also exists as a ContactsID match in the Invoice file. A copy/paste works perfectly if that means anything.

This system is built on a separation model but I’m told that makes no difference. I did go to the relationship graph in the Data file to make sure it matched up relationally with Interface file graph and it does.

Carl

Does a related record exist? That's why I asked, "And have you made sure you have a record in your Invoice table which has a ContactID field with this current contact's ID in it?" I probably didn't ask it very clearly.

The relationships graph shows the Contacts table and Invoices Table are related “=” by both ContactID and CustomerID”.

Why related on both? If ONE of those keys is blank, it will not relate. If you want invoices that match ONLY the Contact, then you need to use a different relationship; one based upon only ContactID between the two. You would create a new Invoices table occurrence, possibly calling it Invoices for Contact. Relate on ContactID using =.

The script would be something like:

If [ not IsEmpty ( Invoices for Contact::ContactID ) ]

Go To Related Records [ Invoices For Contact ; using layout [color:green]'based upon ANY invoices layout' ]

Else

Show Custom Dialog [ OK ; "No invoices for this Contact" ]

End If

... but again, I question what you are doing and why. In a proper relational structure, there should be no need for both ContactID and CustomerID to reside within the Invoice ... at least I don't THINK it should be needed.

Update: Corrected portion in green.

LaRetta

Edited by Guest

I did go to the relationship graph in the Data file to make sure it matched up relationally with Interface file graph and it does.

Ummm. I wonder why you would need to go to your data file at all. Your join should NOT take place in the data file; but rather in the interface file. You should have your layouts for your Invoices within your Interface file. You would place a table occurrence of your Invoices file in your Interface file (do so by adding an external data source, ie, adding your data file as a file reference), dropping a table occurrence of your Invoices within your graph and then join Invoices to Contacts within Interfaces.

Again, since you are so unclear on how to pull this together, you could be missing any number of little things which can make this break. Attaching your file will save everyone a lot of guesswork. :wink2:

  • Author

That was it! Once I took the CompanyID out of the relationship it worked perfectly. I'm getting to understand things a little better and you guys have been a great help.

Thanks to all of you for your help.

Carl

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.