Tigerstrike Posted April 7, 2005 Posted April 7, 2005 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
Martin Brändle Posted April 7, 2005 Posted April 7, 2005 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]">
Tigerstrike Posted April 8, 2005 Author Posted April 8, 2005 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
Martin Brändle Posted April 8, 2005 Posted April 8, 2005 As I said, <input type="hidden" ... is in a <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"; }
Recommended Posts
This topic is 7161 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now