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.

Value list & a self-join relationship

Featured Replies

On a CDML page I am passing a query via a link that originates a page containing data from database A. This data is the name and address of a manufacturer. Each manufacturer is assigned to a category.

On this page I am also passing an FMP-inlineaction to search another database, database B, that searches for this manufacturer's distributors based on this category.

[fmp-inlineaction: -db=databaseb.fp5, -lay=table, category={fmp-currenttoken.1}, manufacturerid={fmp-field:manufacturerid}, -find]

Database B is a many-to-many join table that features many occurences of the manufacturers id as each time a distributor is assigned the maunfacturer id is also assigned to each record. This search obviously shows records that match the manufacturer id and category id shown as FMP-currenttoken.1

What I am trying to achieve is to get the search to pull through the town in which the distributor is based into a value list to allow for easy selection. The code I have is:

<select name="searchtown">

<option value="" selected>- Select a Town -[FMP-option:searchtown]

</select>

after which comes the [/fmp-inlineaction] tag.

In database B I have a value list field, searchtown, that shows a list of towns based on a self-join relationship with manufacturerID as the key. Therefore every time I do a search in FMPro and click on this field the value list only shows the town of those companies who have been returned in the search.

However, I cannot get this information to pull through onto the page in the browser. I've even tried setting up a similar field and relationship - so it's not a self-join - with another database and this doesn't work. Any ideas would be appreciated.

Thanks

GARY

  • 2 weeks later...
  • Author

Sorry. Ignore my last request, I've just searched and found everybody else's comments aboout value lists and relationships in CDML. Roll on FMP 6!

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.