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.

Fm13 and Fm GO - issue scripting new record selecting from related table

Featured Replies

  • Newbies

Hello Guys,
i’m a novice in the filemaker world and as every new challenge, i don’t miss to get stuck in some problem, called “script”.

Let me explain: 

I have got 5 tables called :

1. Table “Company”
2. Table “Customers”
3. Table “Terapy”
4. Table “Trap”
5. Table “Report”


They are related as follow:

1. Table “Company”:: Id company…… X ….. “Table “Customers”:: id customer

2. Table “Customers”:: Id customers…… = ….. “Table “Terapy”:: id customer
Table “Terapy”:: Id terapy………….… =. ….. “Table “Terapy”:: id terapy

3. Table “Terapy”:: Id trap…… = ….. “Table “trap”:: id trap

4. Table “Terapy”:: Id report…… = ….. “Table “Report”:: id raport


I have developed already the Desktop interface, with tabs, buttons and checkbox, and everything seams to going good, i can add data into the table “customers” and i am adding data in the related tables using Portals, so like this the database is populating and working in the desktop side. 

I did the same with the preparation of the “IPAD” interface, i ve developed one main layout called "“Customer | ipad ”, where i can add customer data (as name-surname etc..)and add two buttons, which links to the “report layout | ipad ” and “trap layout | ipad”

……… The troubles start here when i pushed these buttons……

What i would like to do when i push the buttons is: 

1. Check if any record exist already in the “report” or “trap” table a record, if is not then i would like to create it, relating the Customer id, trap id and terapy id.

2. When i am in the ipad layout “trap layout | ipad” and ”report layout | ipad” , with the help of a button called “add new record ” , add a new record relating the Customer name and surname or customer id.


Actually the script to go from the “Customer layout | ipad” to the “Trap layout | ipad” look like this: 

Script name : “go to trap | ipad”

Set Variable [$$ Current_customer; Value: Customers::idcustomers]
Set Field [Trap:: Data;””]
Go to related Record [show only related records; from table: “Trap”; using layout “trap layout | ipad”(Trap)]
if[Get(LastError)=0]
Sort Records [Restore;No dialog]
Halt Script
End If
Show Custom Dialog [“No Trap’s records, add new?”]
if[Get(LastMessageChoice)=1]
Halt Script
End if 
Go to layout [“trap layout | Ipad”(Trap)]
New Record/Request

——————————————————————————————————————

Script to add a new record in the ”trap layout | ipad” using filemaker go: 

Script name: "Trap new record | ipad"

Go to Related Record [From table: “trap”; Using layout: “trap layout | ipad” (Trap)]
Go to Field [Terapy::id terapy]
New Record/Request
Insert Current Data [select; Trap::data]


What do you think can you please help me in solve my lack of knowledge? I really appreciate any thoughts 
Thank you guys

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.