Jump to content

This topic is 7996 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I'm just starting to get my head wrapped around CDML coding and I've come across a problem.

I want to publish my Filemaker database online similar to one of the examples provided with the software. I have a database that contains project tracking, similar to an address book. I've based my HTML/CDML pages on the example from the Developer CD called Employee_Database.

Now I have a browse page that shows ten records per page in a summary view. This can be sorted Assending and Decending and by four field types. So in my HTML page I have a form that lets the user make all these selections, again very similar to the Employee_Database example.

What I want to do is have a button that you click and the summary view becomes a full detail view but at one record at a time. The problem I'm having is that when I click the button I created in a seperate form tag, I do not get any results.

Here is a snipit of the code:

[FMP-include: menu.txt]

<p>Browse GD Records</p>

<table width="122" border="1" cellspacing="2" cellpadding="0">

<tr>

<td>

<FORM ACTION="FMPro" METHOD="POST">

<INPUT TYPE="hidden" NAME="-db" VALUE="GD_Depart_Projects.FP5">

<INPUT TYPE="hidden" NAME="-format" VALUE="browse.htm">

<INPUT TYPE="hidden" NAME="-lay" VALUE="RecordEntry">

<INPUT TYPE="hidden" NAME="-error" VALUE="errors.htm">

<INPUT TYPE="hidden" NAME="-max" VALUE="10">

<INPUT TYPE="hidden" Name="-findall" VALUE="GD_Depart_Projects.FP5">

<table width="233" border="1" cellspacing="2" cellpadding="0">

<tr>

<td>Sort by <select name="-sortfield">

<option value="" SELECTED>- Select -</option>

<option>Assigned to</option>

<option>Client</option>

<option>Date Completed</option>

<option>Date Requested</option>

<option>Job Status</option>

</select></td>

<!-- Switch to Complete Record --></tr>

<tr>

<td nowrap><input type="radio" name="-sortorder" value="ascending" CHECKED> ascending <input type="radio" name="-sortorder" value="descending"> descending</td>

</tr>

</table>

<INPUT TYPE="Submit" NAME="-findall" VALUE="Browse Records">

<INPUT TYPE="Reset" VALUE="Clear form">

</FORM>

</td>

<FORM ACTION="FMPro" METHOD="POST">

<INPUT TYPE="hidden" NAME="-db" VALUE="GD_Depart_Projects.FP5">

<INPUT TYPE="hidden" NAME="-lay" VALUE="RecordEntry">

<INPUT TYPE="hidden" NAME="-max" VALUE="1">

[FMP-CurrentFind]<INPUT TYPE="hidden" NAME="-format" VALUE="Complete.htm">[/FMP-CurrentFind]

<td>View As: <INPUT TYPE="Submit" NAME="-view" VALUE="Complete Record"></FORM>

</td>

</tr>

</table>

[FMP-include: summary.txt]

Please advise

Posted

Little Cricket, you have taken too big of a bite from one place.

"The problem I'm having is that when I click the button I created in a seperate form tag, I do not get any results."

Of course that is the problem. What is your FMP-CurrentFind? What, you don't have one because a -find has not been performed? Aha. Perhaps, once you have your page of ten records (a performed -find) you should review the use of the FMP-Link tag.

Aside from that, I'm not sure, but it looks like you are finding all records, not just a small of select group of records. Nothing wrong with that, I'm just trying to be clear about your intentions.

What is the purpose of this line, please:

<INPUT TYPE="hidden" Name="-findall" VALUE="GD_Depart_Projects.FP5">

Posted

Thanks for your help thus far. What I'm trying to do is have a browse page that lets you sort data various ways. I also want at any point when browsing to switch from a summary view to a detail view and vise versa. What I don't want to happen is lose my place while I'm browsing.

This is similar to a question I posted later on in my search results. So the FindAll format is used so that I have all the records. Perhaps this is wrong.

I may also be wrong in the FMP-Link tag. I am working with CDML master class by Brian Dunning and was looking at some tag descriptions. At first glance this appeared like it may solve my problem. Things are getting murky.

I dought their is a simple trick like use a different tag, but I'm hoping for some assistance. Thank you sensi

Posted

"What I don't want to happen is lose my place while I'm browsing."

-token. You have up to 10 in 5.0+. They are your friends.

While there may be nothing specific to what you are doing, you will find some useful working cdml examples in the SampleFiles forum. These examples are very useful to people learning the basics, and they are free. Just put one at a time in your Web folder and run it through localhost. Lots of stuff to dissect. Well worth the time investment.

This topic is 7996 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.