January 6, 201510 yr 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
January 7, 201510 yr 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.
January 7, 201510 yr 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