Jump 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 can this be done without portals?

Featured Replies

Hello,

Can any one tell me what I'm doing wrong or if indeed it can be done.

I'm going to describe it in it's basic form but of course I have lots more field in the database I'm using, just removed all the field name to make it easy to see what I want.

OK, I have tables as below with the fields in them as shown:

customers:

cutomer_ID

customer_name

customer_company

bookings:

booking_IDfk

booking_type

booking_date

The "customer_ID" is a serial number created on any new record.

I then have two LAYOUTS, one for CUSTOMERS and the other for BOOKINGS.

What I would like to do is have a button on the CUSTOMERS layout that fires a script (I assume it would need to be a script) and moves to the BOOKINGS layout and set the "booking_IDfk" to the same serial number from the CUSTOMER record the user was in. So the booking was linked to the customer.

Now we had this working fine using PORTALS on the CUSTOMERS layout, and of course each time we added data into the portal it would create the ID number on the BOOKINGS the same as the CUSTOMERS

But we have lots of fields and PORTALS look a bit messy, so we wanted to create a nice presented layout for the bookings.

But I cant seem to make it work.

I was trying with a script to, go to BOOKINGS layout --> new record --> set booking_IDfk to customer_ID with a calc

But this dont work and I cant see why, but again is this what I should do?

Edited by Guest

you wrote:

<<

I was trying with a script to, go to BOOKINGS layout --> new record --> set booking_IDfk to customer_ID with a calc>>

Nope, this won't work. There are several ways to make your interface "slicker", as you requested.

1. have two relationships between customer and booking. One allows record creation, and one doesn't. The interface layout would use the no creation relationship, while a new utility layout would use the create relationship. Your new booking script would go to the utility layout, go to the last portal row to generate the new booking record. But, this is a fairly old-fashioned approach.

2. Have only the non-create relationship, and the New Booking Script would look something like this:

setVariable [$customerID, customerID]

go to Layout "booking"

new Record

set Field Customer id, $customerID

Commit Record

You can expand this to enhance the end user experience. Perhaps generate a new window based on the booking table, set the foreign key and present the required data entry fields.

Good luck.

You need to use a $variable in your script, first set the $id variable to Customer_ID then navigate to the Bookings layout create record and set the booking_IDfk to the $id.

  • Author

Thank you both for your replies.

Ocean West your way worked a treat, it does just what I wanted. Thank you :

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.