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.

Featured Replies

  • Newbies

Hi - I have a table - call it main table - in which the key field is a calculated fields and is a concatenation of 3 text fields. I then have a sub table with the same structure. I am trying to add records to main table from subtable where they don't already exist in maintable. I do this by relating sub table to main table by the key field. My script loops through sub table and where get(lasterror)="101" (ie record is not in main table) I add the record to maintable. Trouble is I can't update fields in main table. The key field is a calculated field so i can't set field directly - but I can't set any of the 3 text fields because FM tells me i have to set the key field first.

Thanks for any help.

Max

For one thing, you don't have to use the relationship in order to create a related record. You can load the required values into variables, go to a layout of the other table, create a new record and set the relevant fields to the values stored in the variables.

For another, I don't see why you couldn't (and probably should) switch the relationship to use the three text fields as the match fields, and get rid of the calculation field.

I am not sure where error 101 comes into this. Surely you can see if a related record exists by looking at IsEmpty ( RelatedTable::MatchField )?

Create an account or sign in to comment

Important Information

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

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.