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.

Record Export to Multiple Tables (ODBC) Script

Featured Replies

I'm very new to FM Scripting so would be very grateful for any help in getting this off the ground.

 

I have a FM database which I've connected to a MySQL DB via ODBC (Opencart). So far I have one table (Brands) which contain data which I need to populate two tables called oc_manufacturer & oc_url_alias using an automated script.

 

Fields are:

 

Brands::ManufacturerID (e.g 1) - copies RecordID to oc_manufacturer::manufacturer_id

Brands::ManufacturerName (e.g Apple) - Copies the manufacturer name to oc_manufacturer::name

Brands::ManufacturerLogoURL (e.g image/brands/apple/apple-logo.png) - copies the logo url to oc_manufacturer::image

Brands::ManufacturerSortOrder (e.g 1) - copies the sort order to oc_manufacturer::sort_order

 

Creates a New Record ID in oc_url_alias::url_alias_id

Brands::ManufacturerSEOKeyword (e.g apple) - copies SEO keyword to oc_url_alias::keyword

Brands::ManufacturerSEOKeywordQuery - copies SEO keyword query to oc_url_alias::query

 

Any help much appericiated.

 

Thanks

 

J

  • Author

Just trying the second part and have come up with this

 

Go to Layout ["Brands" (Brands)]

Set Variable [$ManufacturerSEOKeywordQuery; Brands::ManufacturerSEOKeywordQuery]
Set Variable [$ManufacturerSEOKeyword; Brands::ManufacturerSEOKeyword]
Go to Layout ["oc_url_alias"(oc_url)alias)]
Enter Find Mode []
Set Error Capture [On]
Perform Find []
If [Get (FoundCount) = 0]
New Record/Request
Set Field [oc_url_alias::query; Brands::ManufacturerSEOKeywordQuery]
Set Field [oc_url_alias::keyword; Brands::ManufacturerSEOKeyword]
End If
Go to Layout [original layout]

 

Unfortunately it doesn't seem to work.

Just trying the second part and have come up with this

 

 

Enter Find Mode []

Set Error Capture [On]

Perform Find []

 

You enter and exit find mode but you are not actually setting any search criteria...

 

Use Set Field[ allias::whatever ; what you are looking for]

one or more of these set fields

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.