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.

needing to autofill a portal field...

Featured Replies

ok, i have a table that holds all of my customer's data (name, address, and id) i have another table (linked by id) that holds a 'call history' that has the following fields:

id

date

time

call notes

contact name

technician

now...i have a layout designed that has a portal inside of it to show all of the call history for that customer. my problem is that i want it to automatically fill in the "id" field with the value of the "id" field in the customer info table. is this even possible?

You can either set the field when a new record is created by a script or you can turn on "Allow creation of record on the child side of the relationship.

  • 2 weeks later...
  • Author

ok...but what would the script need to be? because i already have the child settings set in the relationship. it still isn't working.

Perhaps you're missing a key field? In the Customers table you need __kP_CustID (number, auto-enter, serial, can't modify), and in the CallHistory table you need a foreign key _kF_CustID (number).

Your relationship will match Customers:B)__kP_CustID=CallHistory::P_kF_CustID.

If you set the child side of the relationship, the Call History side, to Allow create, the call record will automatically have its _kF_CustID set when the record is created. Any matching key is automatically set.

mr_vodka mentions a second approach to accomplishing the setting of the foreign _kF_CustID by using a script. Many people chose this method because they do not want users to directly edit a portal row, hate the last "empty" portal row interface, etc.

The second method is to create a "New Call" button and place it above your portal. This button runs this script:

(pseudo-code)

Set Variable $CustID to __kP_CustID

Go to layout CallHistory

New record

Set Field CallHistory::_kF_CustID to $CustID

Go to layout Customer

Now, with field behavior set to Browse/Find on, your users can edit the call history record directly in the portal, but they cannot add a new portal row unless they click the "New Call" button.

To get fancy, you could create a data entry layout for the new call and change the above script a bit:

Set User Abort Off

Set Variable $CustID to __kP_CustID

New Window (size it smaller so it floats above the Customer window)

Go to layout CallHistory_popup

New record

Set Field CallHistory::_kF_CustID to $CustID

Pause

Close Window

You need to have on your popup window, a button that is set to Resume script.

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.