Jump to content

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

Recommended Posts

Posted

Simple web page with a form and a -new submit button. It links up to my database fine. I hit the submit button and a new record is created just fine. A new -format web page then comes up. This page has a new edit form with a -edit submit button. If I try to fill out any of the fields and hit the submit button, I get the error "The format file "step2.htm" could not be found."

Yet the htm file in question is there, where it is supposed to be. I have included the correct items such as -RecID, -lay, -error, -format, -db, So I am not quite sure why I am getting this message. Anyone have any pointers for me?

LR

Posted

Hi, Larry! I really HATE that message because it's led me down the wrong track several times and I get it more often than I would care to admit. More often than not, it turns out I am trying to submit data to FileMaker but neglected to properly name one of the field boxes on the web form... sometimes I used the same name twice, sometimes I forgot to name it exactly the same as my FMP field, and sometimes I had a typo or misspelling of some kind, etc.

If this may be the case for you, here's what I do if a visual inspection did not come up with anything.

Duplicate the problem page several times, each with a different name. Delete different field blocks from each of the pages so no page has the same fields but all have SUBMIT buttons. Test each one until you find the page that contains the bad field(s).

It could be a paths issue but my personal nemesis seems to be the field name error so that's what I'd check first.

--ST

Posted

1.make a record

2.call/indentify a record

3.update called record

4. display the changes

=======================

sounds like ur missing a step 2 and your page does not know whic record to upade... therefor ur getting an error.

which error number it is u ask?-check the log file located in the FM folders of installations (Access.txt) and then u can capture that error by [FMP-IF:..] statement....

or I could be compleatly of and none this matters.... smile.gif

gool duck u2!

Posted

OK, I checked my fields and they are named correctly. So I think it might be as stated above, I am missing my call identity. Tell me if this is the correct thinking. I open a blank web page. in it is a link:

http://63.226.000.000/FMPro?-db=Survey.fp5&-Lay=Web&-format=surveylogin.htm&-find

This opens a new HTML page with a form using -New for submit. There is one field. The user puts their name in the field and hits submit. This creates a new record, and then the -format page comes up. This page is showing data from the new record. For example, [FMP-field:SerialNumber] shows the serial number from the new record. I have a new -Edit form on this page with 3 blank fields that the user can then input information. But when they hit the submit button, I get the -format file not found error.

Does this detail help better point to what step I am missing?

LR

  • Newbies
Posted

You will get the message "format file not found" when there is another error and you have the -error element in the form but the error page filename is wrong (or the file is non existent) - so the format page that FM is looking for and cant find is the error page - it's a misleading error message in this case

check your error page and make sure its in the corect location, or remove the "-error" element from your form to use FM's default error page. You should then get an error number to help you track down your problem

Posted

OK, I tried to break it down to a basic design. Database with one layout with one field. I open this link:

http://63.000.000.000/FMPro?-db=Survey.fp5&-Lay=Login&-format=survey.htm&Login=john&-Find

This brings up my web page. The form contains the one field which shows the correct data. The form is a -edit form. I try to change the data in the field, but I get the error record not found. Here is how the html file is formated:

<html>

<head>

<title>Survey</title>

</head>

<body bgcolor="#ffffff">

<form action="FMPro" method="POST" name="Edit">

<font size="1">

<input class="class" type="text" name="Login" value="[FMP-field:Login]" size=26 tabindex="1">

</font>

<input type="hidden" name="-RecID" value="[FMP-field:Serial Number 2]">

<input type="hidden" name="-lay" value="Login">

<input type="hidden" name="-format" value="survey2.htm">

<input type="hidden" name="-db" value="Survey.fp5">

<font size="1">

<input type="submit" name="-Edit" value="Continue">

</font>

</form>

</body>

</html>

Cant quite figure out why I keep getting the record not found error.

LR

Posted

the synthax:

<FORM ACTION="FMPro" METHOD="post" name="EDIT_THIS_RECORD">

<INPUT TYPE="hidden" NAME="-RecID" VALUE="[FMP-currentrecid]">

<INPUT TYPE="hidden" NAME="-db" VALUE="db_name.fp5">

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

<input type="hidden" name="-format" value="RecordEdited.html">

<INPUT TYPE="hidden" NAME="-error" VALUE="edit_failed.html">

.....

....

...

<input name="-edit" type="submit" value="Update">

================================================================

also why use so many font tags if you are using CSS already?

<font size="1">

<input class="class"....

All the best!

Posted

Thanks for the above post. Looks like 2 things are different.

1) <input type="hidden" name="-RecID" value="[FMP-field:currentrecid]">

2) <input type="hidden" name="-error" value="error.htm">

So I had left out the -error part. Looks like when I leave that one out I get the record not found error. I also changed -RecID to include the proper FMP-field:currentrecid.

OK, so now when I hit the submit button I am at least no longer getting the record not found error or the file format not found error. At least now it goes to my error html page. So now I cant quite figure out why I am going to the -error page instead of the -format page. I only have one field in my page:

<INPUT class="class" TYPE="text" NAME="Login" value="[FMP-field:Login]" SIZE=26>

The name matches the field name from my FileMaker layout. So not quite sure what is missing here.

LR

Posted

OK, I at least figured out something. I left everything the same, except I created a new ampty filemaker file. Named the field in the above cdml the same, the layout the same, and the file name the same. Then tried my submit form...everything worked fine.

So there must be something corrupt in my FileMaker file. How odd. The file seems to work fine. I wonder if it is the fact that at some point during my design I renamed some layouts and re-ordered them. I have found that in the past this sometimes messes something up. Even though you link to that layout name in cdml, if the order has been changed or the name changed, web companion just will not link up to that layout correctly.

Anyway, now I have to figure out what to do. I have spent A LOT of time on the filemaker file, and I sure would hate to start over.

LR

Posted

is that field included on the layout in FM?

also, do change this class name smile.gif : class="class" : it will confuse anyone who inherts the project. Don't name your CSS based on the element that they decorate since CSS can be reused and not applied on the sam type of element.

eg.

class="Title" let say font=Arial and size=24px

applied on the "Title" part of the page makes compleate sense but if you wanto re-use on the section that is not title of the page it will not make sense.....just a tip <--none of this CSS busniess is "neccessary" but it would a good habbit to develop smile.gif

All the best!

Posted

Vaughan recommends always keeping empty shells of db's before populating them and putting them into service because of the possibility of corruption. He says you can always export the data and re-import it into a fresh shell.

Check the posts before scrapping it, though. I think I remember people using RECOVER to fix their db's... maybe there are some other tricks that folks have tried, too. Updated db's from older versions were more susceptible if I remember correctly.

Oh, well... good luck.

Posted

Vaughan recommends :....always keeping empty .....

"Always take the bullets out before cleaning your gun or it might fire @ you" smile.gif

I recommend smile.gif :

1.get the copy of your file

Save As [Clone -no records] your file......

2. u can always enter the layout mode and Ctrl+A (select all) and copy paste the layout into the new file.....

3. u can always import your scripts from the olf file.....

RECOVER function is your friend...but even friends can turn on you! better be safe than sorry...BACKUP is your Better friend than a Recovery laugh.gif

All the best!

Posted

If there are any global container fields in the file, then a better way is to save a copy, then delete all records and save a compressed copy. This saves you having to remember whether you've imported the globals into the clone db or not.

Posted

Thanks for the suggestions on re-saving the file. Once I did this, all seemed to work great. It was something corrupt in the dtabase file. Pretty frustrating...it was driving me nuts that my CDML tags were not working correctly and yet they seemed to be formatted correctly.

At least all is well in the land of FileMaker again.

LR

This topic is 7869 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.