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.

FMP 6 CDML Question

Featured Replies

Hi,

I'm having a hard time passing information from two different databases using CDML. I have a database "login" for storing login information, then I have a database "invoices" which holds information about customer invoices. After they login to the "login" database, I want to pass the company name so that when they do a search in the "invoices" database they can only search on their company name. In other words, when they login and transition to the search page for invoices I want a field that defaults (and shows) their name, then searches the "invoices" database for their company. It should also be noted that on the search page I wish to have other search criteria, like date, available.

Any ideas/help will be greatly appreciated, everything I try seems to not work.

Thanks in advance.

TS

In the form for the search in the invoice DB, add the following line like this:

<input type="hidden" name="company" value="[FMP-Field: company]">

  • Author

Thank you for the suggestion. I keep getting a Javascript error when trying to go to the search page. I put your cdml in the link page (page before the search page). Here's the whole cdml link:

FMPro?-DB=VendInv.fp5&-Format=vinvsearch.htm&<input type="hidden" name="Vendor" value="[FMP-Field: Vendor]

What am I doing wrong?

Thank you,

TS

As I said, &lt;input type="hidden" ... is in a &lt;form ... (so POST action), not for in the URL (GET action).

If your URL is a simple link (a href="..."), then it should look like this:

FMPro?-DB=VendInv.fp5&-Format=vinvsearch.htm&Vendor=[FMP-Field: Vendor]&otherqueryparametershere&-find

If it's in a JavaScript function, there are two scenarios:

- the JavaScript is executed immediately upon load of the page:

same as above

- the JavaScript is executed by a user action: then you should pass the value of the field to a variable in the function

e.g.

< a href="execute_my_little_javascript_function([FMP-Field: Vendor])">click here</a>

and the function:

function execute_my_little_javascript_function(pass_me_a_vendor) {

window.location.href="FMPro?-DB=VendInv.fp5&-Format=vinvsearch.htm&Vendor="+pass_me_a_vendor+"&otherqueryparametershere&-find";

}

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.