clevow Posted February 1, 2002 Posted February 1, 2002 I'm getting an error 101 when trying to edit a record. I can't figure out why. the record is created by the URL: href="http://hostname:591/progress_reports/FMPro?-db=progressreports.fp5&-format=new_record.html&-lay=report&user_id=[fmp-currenttoken]&project_id=[fmp-currentrecid]&-New= the page that is returned is: <form action="FMPro" method="post"> <input type="hidden" name="-db" value="progressreports.fp5"> <input type="hidden" name="-lay" value="report"> <input type="hidden" name="-format" value="redirect.html"> <input type="hidden" name="-error" value="detail_error.html"> <input type="hidden" name="-RecID value="[fmp-CurrentRecID]"> LOTS OF HTML HERE <input type="submit" name="-Edit" value="Submit progress report"> </form> The RecID is getting passed correctly, as it shows up in the source code. The record is created fine, I just can't edit it. Help please? FTR - FMP 5.5 running on Win 2K IIS, custom publishing TIA, Carrie
slstrother Posted February 1, 2002 Posted February 1, 2002 I had the same problem. Error 101 is "record not found". I added -recid=[fmp-currentrecid] to the url and then I could edit the record. Good luck
Garry Claridge Posted February 4, 2002 Posted February 4, 2002 Carrie, A slightly different approach would be to use '-view' in the URL as: href="http://hostname:591/progress_reports/FMPro?-db=progressreports.fp5&-format=new_record.html&-lay=report&-view Then the format file would use "-new": <form action="FMPro" method="post"> <input type="hidden" name="-db" value="progressreports.fp5"> <input type="hidden" name="-lay" value="report"> <input type="hidden" name="-format" value="redirect.html"> <input type="hidden" name="-error" value="detail_error.html"> LOTS OF HTML HERE <input type="submit" name="-new" value="Submit progress report"> </form> Other information can be passed as Tokens. All the best. Garry
Garry Claridge Posted February 4, 2002 Posted February 4, 2002 Just another pedantic observation is that you do not need the '-lay' tag for an edit operation. This may cause the error. All the best. Garry
clevow Posted February 4, 2002 Author Posted February 4, 2002 For clarification purposes, here is the general idea. I've got one database called Projects and one called Progress reports. Users will enter the system by getting a list of projects (from the project database) returned to them. For each project of theirs, they have a link to click on to submit a new progress report. That link creates a new record in the progress report database. The [currentrecid] in the URL is actually the recid from the project database. This becomes the project number in the progress report database. (So all progress reports for a single project have some common identifier). So they click "submit new progress report" and a new record is created in the progress report database. The page that is returned to them has the name of the project and some other information that was looked up based on the project ID. One of the hidden fields on this page includes the currentrecid from the progress database. This number comes up correctly, as I'm watching FileMaker while submitting it. The numbers are right. When you click "submit this record" (which is really -edit) then I'm getting the error message. It doesn't seem to have anything to do with the html on the page where the record is edited, since taking everything out besides the hidden tags and the submit button produces the same results. It's got to be in the database itself or in the URL that creates the new record. HELP!
Garry Claridge Posted February 4, 2002 Posted February 4, 2002 Carrie, Do you have an 'exact match' restriction on this database? Garry
Keith M. Davie Posted February 4, 2002 Posted February 4, 2002 Is your db as confused as I am? What is the field being edited? I don't see it in your code.
Vaughan Posted February 4, 2002 Posted February 4, 2002 Carrie Does the database have a password (especially a <no password> or default password) that restricts access?
clevow Posted February 4, 2002 Author Posted February 4, 2002 I think the database is less confused, but who am I to judge. I will post code in a separate post. There are no restrictions on anything. I have no passwords set and I'm not using the web security database.
clevow Posted February 4, 2002 Author Posted February 4, 2002 This is the code of search_results.html. This is the page that the user will enter in on (they're brought here by an external CGI). <!-- <header> <TITLE>Found Projects</TITLE> </header> <BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#CC0000" VLINK="#330099"> <FORM ACTION="FMPro" METHOD="POST"> <INPUT TYPE="hidden" NAME="-DB" VALUE="PROJECTS.FP5"> <INPUT TYPE="hidden" NAME="-Lay" VALUE="Project"> <INPUT TYPE="hidden" NAME="-Format" VALUE="redirect.html"> <INPUT TYPE="hidden" NAME="-RecID" VALUE="[fmp-CurrentRecID]"> <TABLE BORDER=0 WIDTH="100%"> <TR> <TD WIDTH="416"> <P ALIGN=left><font size="+2" face="Arial Narrow, Arial" color="#000000"><B>Current Projects </B></font></P> </TD> <CENTER> </CENTER> </TR> <TR> <CENTER> <TD WIDTH="416"> <P align="left"><font face="Arial Narrow, Arial" color="#000000">[FMP-If:CurrentFoundCount .eq. 0] </font></P> <P align="left"><font face="Arial Narrow, Arial" size="+1" color="#000000">You have not submitted any projects yet. Please <a href="http://host:591/projects/FMPro?-db=PROJECTS.FP5&-format=new_record.html&-lay=Project&UnityID=[fmp-currenttoken]&ProjectName=untitled&-New=">submit one now</a></font><font face="Arial Narrow, Arial" color="#000000">.[fmp-else][FMP-CURRENTFOUNDCOUNT] [FMP-If:CurrentFoundCount .eq. 1]project[fmp-else]projects[/fmp-if] found. Click on a project name to view or edit the project. Or, you can <a href="http://host:591/projects/FMPro?-db=PROJECTS.FP5&-format=new_record.html&-lay=Project&UnityID=[fmp-currenttoken]&sodsc=[fmp-currenttoken:1]&ProjectName=untit led&-New=";>submit a new project</a>.</font></P> </TD> </center> </TR> </TABLE> <TABLE BORDER=1 WIDTH="100%"> <CENTER> <TR> <TD VALIGN=top WIDTH=85 height="23"> <P align="center"><font face="Arial Narrow, Arial" color="#000000"><B>Unity ID</B></font></P> </TD> <TD ALIGN=center WIDTH=381 height="23"> <P align="center"><font face="Arial Narrow, Arial" color="#000000"><B>Project Name</B></font></P> </TD> <TD ALIGN=center WIDTH=408 height="23"> <P align="center"><font face="Arial Narrow, Arial" color="#000000"><B>Description</B></font></P> </TD> <TD ALIGN=center WIDTH=153 height="23"> <div align="center"><font color="#000000" face="Arial Narrow, Arial"><b>Date Proposed</b></font></div> </TD> <TD ALIGN=center WIDTH=171 height="23"> <div align="center"><font color="#000000" face="Arial Narrow, Arial"><b>Date Completed</b></font></div> </TD> <TD ALIGN=center WIDTH=189 height="23"><font face="Arial Narrow, Arial"><b>Progress Reports</b></font></TD> <TD ALIGN=center WIDTH=146 height="23"> <div align="center"><font color="#000000" face="Arial Narrow, Arial"><b>Delete?</b></font></div> </TD> </TR> </center> [FMP-RECORD] <TR> <TD VALIGN=middle WIDTH=85> <P align="center"><font face="Arial Narrow, Arial" color="#000000">[FMP-FIELD:UnityID]</font></P> </TD> <TD WIDTH=381> <div align="center"><font face="Arial Narrow, Arial" color="#000000">[FMP-if: field: ProjectName .eq.]<A HREF="[FMP-LinkRecID:r]&-format=detail.html">untitled</a>[fmp-else]<A HREF="[FMP-LinkRecID:r]&-format=detail.html">[FMP-FIELD: ProjectName]</A>[/fmp-if] </font> </div> </TD> <TD WIDTH=408> <div align="center"><font face="Arial Narrow, Arial" color="#000000">[FMP-if: field: ProjectDescription .eq.] [/fmp-if][FMP-FIELD: ProjectDescription]</font> </div> </TD> <TD WIDTH=153> <div align="center"><font face="Arial Narrow, Arial" color="#000000">[FMP-if: field: DateProposed .eq.] [/fmp-if][FMP-FIELD: DateProposed]</font> </div> </TD> <TD WIDTH=171> <div align="center"><font face="Arial Narrow, Arial" color="#000000">[FMP-if: field: DateCompleted .eq.] [/fmp-if][FMP-FIELD: DateCompleted] </font></div> </TD> <td width="189"> <div align="center"><font face="Arial Narrow, Arial" color="#000000">[FMP-if: field: last_progress_report.eq.]<b>No reports submitted</b>[fmp-else]Last report: <b>[FMP-FIELD: last_progress_report]</b><br> <a href="http://host:591/progress_reports/FMPro?-db=progressreports.fp5&project_id=[fmp-currentrecid]&-format=search_results.html&-lay=report&-Error=search_results.h tml&-token=[fmp-currenttoken]&-token.1=[fmp-currenttoken:2]&-find=">View reports</a> [/fmp-if]<br> <a href="http://host:591/progress_reports/FMPro?-db=progressreports.fp5&-format=new_record.html&unity_id=[fmp-currenttoken]&project_id=[fmp-currentrecid]&-New=">S ubmit </font></div> </td> <td width="146"> <div align="center"><font face="Arial Narrow, Arial" color="#000000">[fmp-if: field: delete .eq. 1] <a href="FMPro?-db=projects.fp5&-lay=Project&-format=redirect.html&-recid=[fmp-currentrecID]&-delete=">Delete this project</a> [fmp-else]Administrator access required [/fmp-if] </font></div> </td> </TR> [/FMP-RECORD] <font face="Arial Narrow, Arial" color="#000000">[/fmp-if]</font> </TABLE> <p><font face="Arial, Helvetica, sans-serif" size="-1"><a href="http://burglar.unity.ncsu.edu:591/projects/FMPro?-db=PROJECTS.FP5&-lay=Project&-format=search_results_view.html&-Error=search_results_view.html&-SortField=DateCompleted&-Sort Field=UnityID&-token=[fmp-currenttoken]&-findall">View all projects for all technicians</a></font><font face="Arial, Helvetica, sans-serif"> </font></p> </form> <font face="Arial Narrow, Arial" color="#000000"></font> </BODY>--> [ February 04, 2002, 02:08 PM: Message edited by: Carrie ]
clevow Posted February 4, 2002 Author Posted February 4, 2002 The link in the above post is the one that they click on to get the following page: <--HEAD><TITLE>new progress report</TITLE> <STYLE TYPE="text/css"> BODY { background: white url(../images/projects.jpg) no-repeat top left } .nice { font-size: 10pt; font-family: arial } A.large { font-size: 11pt; font-weight: bold } A.small { font-size: 8pt; font-weight: normal } A { font-size: 10pt; font-weight: normal } </STYLE></HEAD> <BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 LEFTMARGIN=0 VLINK=#CC0000 LINK=#DD0000 ALINK=#000000> <form action="FMPro" method="post"> <input type="hidden" name="-db" value="progressreports.fp5"> <input type="hidden" name="-format" value="redirect.html"> <input type="hidden" name="-error" value="detail_error.html"> <input type="hidden" name="-RecID value="[fmp-CurrentRecID]"> <TABLE HEIGHT=100% WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0 HSPACE=0 VSPACE=0> <TR> <TD WIDTH=170><IMG SRC="../images/blank.gif" WIDTH=170 HEIGHT=50 ALT=" "></TD><TD COLSPAN=2></TD></TR> <TR> <TD></TD> <TD COLSPAN=2 ALIGN=RIGHT><A HREF="../"><IMG name=infoup SRC="../images/resnet_red_on_w.gif" BORDER=0 ALT="Back to ResNet"></A></TD></TR> <TR> <TD WIDTH=170 VALIGN=TOP></TD> <TD CLASS=nice COLSPAN=2 ROWSPAN=3 VALIGN=TOP><TABLE WIDTH=100% BORDER=0 CELLPADDING=0 CELLSPACING=0> <TR> <TD ALIGN=RIGHT><IMG SRC="../images/blank.gif" HEIGHT=30 ALT=""></TD></TR></TABLE> <BR> <table width="95%" border="1" align="center"> <tr> <td width="75%" class="nice">Project: <b>[fmp-field:project_name]</b></td> <td width="25%" class="nice"> </td> </tr> <tr> <td width="75%" class="nice">Proposed date:<b> [fmp-field:proposed_date] </b> </td> <td width="25%" class="nice"> </td> </tr> <tr> <td width="75%" class="nice">At the time of proposal you expected to complete this project by <b>[fmp-field:expected_completion_at_start]</b></td> <td width="25%" class="nice">Approximate time spent, not including this report: <b>[fmp-field:time_spent_overall]</b></td> </tr> <tr> <td width="75%" class="nice">Date of last report:<b> [fmp-field:previous_report_date]</b></td> <td width="25%" class="nice">Approximate time spent since last report (minutes) <input type="text" name="time_spent_since_last_report"> </td> </tr> <tr valign="top"> <td width="75%" height="160" class="nice"><b>Progress since last report: </b><br> <textarea name="progress_summary" wrap="PHYSICAL" rows="8" cols="50"></textarea> </td> <td width="25%" height="160" class="nice"> </td> </tr> <tr> <td width="75%" class="nice"> <p><b>Next step:</b><br> <textarea name="next_step" wrap="PHYSICAL" rows="8" cols="50"></textarea> </p> </td> <td width="25%" valign="top" class="nice"> <p>Expected completion of next step (mm/dd/yyyy): <input type="text" name="next_step_completion"> <br> </p> <p>Expected completion of project (mm/dd/yyyy): <input type="text" name="current_expected_completion"> </p> </td> </tr> <tr> <td width="75%" class="nice"><b>Do you have any questions or comments for Carrie or Stan?</b><br> <textarea name="questions" wrap="PHYSICAL" rows="8" cols="50"></textarea> </td> <td width="25%" class="nice"> </td> </tr> <tr> <td width="75%" class="nice"> <p><b>Do you have any files to show Carrie and/or Stan?</b><br> [fmp-valuelist:upload, list=yes_no] <input type="radio" name="upload" value="[fmp-valuelistitem]"> [fmp-valuelistitem] [/fmp-valuelist]</p> <p><b>If so, where are they?</b> <font size="-1">If you need to upload them, put them in ResNet's afs space and enter "upload" in the box below.</font> <br> <input type="text" name="file_location" size="50"> </p> </td> <td width="25%" class="nice"> </td> </tr> <tr> <td colspan="2" class="nice"> <p><b>Previous project reports for <i>[fmp-field:project_name]</i>:</b></p> <table width="100%" border="1"> <tr> <th width="25%" height="24" class="nice">Date</th> <th width="75%" height="24" class="nice">Progress Summary</th> </tr> [fmp-portal:ProjectID_from_progress_reports _recursive] <tr> <td width="25%" class="nice">[fmp-field:ProjectID_from_progress_reports _recursive::progress_report_date] </td> <td width="75%" class="nice">[fmp-field:ProjectID_from_progress_reports _recursive::progress_summary]</td> </tr> [/fmp-portal] </table> <p> </p> </td> </tr> </table> <input type="submit" name="-Edit" value="Submit progress report"> <BR><CENTER> </CENTER> </TD></TR></TABLE> </form> </BODY> --> [ February 04, 2002, 02:09 PM: Message edited by: Carrie ]
clevow Posted February 4, 2002 Author Posted February 4, 2002 One more thing. These 2 web pages reside in 2 different directories. That shouldn't matter, I don't think. One's in web/projects and one is in web/progress_reports. Also, both databases have only one layout each.
Vaughan Posted February 5, 2002 Posted February 5, 2002 quote: Originally posted by Carrie: One more thing. These 2 web pages reside in 2 different directories. That shouldn't matter, I don't think. One's in web/projects and one is in web/progress_reports. Errr, it might! Duplicate them into the same directory and see if it helps.
clevow Posted February 5, 2002 Author Posted February 5, 2002 I can't really use -view because some information needs to get entered first. That's why I use -new. That way the record is created and the information that needs to get entered ahead of time is. That info is returned on the page where the user gets to enter everything. I don't understand why this isn't working. The RecID is correct. I've even dumbed it down to where no information is actually being submitted. It still gives the error 101. That's just basically with the form tags, required hidden tags, and the submit (-edit) button. What the heck is the problem??? TIA, Carrie
Garry Claridge Posted February 5, 2002 Posted February 5, 2002 Carrie, I'm not sure where you are getting the [fmp-currentrecid] from in this url, however it shouldn't make any difference in the edit request: href="http://hostname:591/progress_reports/FMPro?-db=progressreports.fp5&-format=new_record.html&-lay=report&user_id=[fmp-currenttoken]&project_id=[fmp-currentrecid]&-New= The only thing I can think of is a field missing from the layout, or incorrect spelling. Good Luck. Garry
clevow Posted February 5, 2002 Author Posted February 5, 2002 no dice. I moved all relevant pages to the same directory and I'm still getting the error.
clevow Posted February 5, 2002 Author Posted February 5, 2002 From my first post on this thread: quote: <form action="FMPro" method="post"> <input type="hidden" name="-db" value="progressreports.fp5"> <input type="hidden" name="-lay" value="report"> <input type="hidden" name="-format" value="redirect.html"> <input type="hidden" name="-error" value="detail_error.html"> <input type="hidden" name="-RecID value="[fmp-CurrentRecID]"> Look closely at the last line. quote: <input type="hidden" name="-RecID value="[fmp-CurrentRecID]"> See anything wrong? It only took me 4 days, but I found it. Missing quote in the hidden RecID field. Should be <input type="hidden" name= "-RecID" value="[fmp-CurrentRecID]"> Thanks to all of you who helped out. I appreciate it! -Carrie
Anatoli Posted February 5, 2002 Posted February 5, 2002 I would recommend getting Adobe GoLive HTML editor. Then you cannot make such errors. With GL and strict copy/paste field names I didn't had typos for 2 years. On productivity the package paid back within 1 month. And saved me lot of gray hair.
Garry Claridge Posted February 6, 2002 Posted February 6, 2002 I copied your code to BBEdit and it showed the missing quotes by not changing colours for the value parameter. However, I didn't take much notice of it; silly me! All the best. Garry
clevow Posted February 6, 2002 Author Posted February 6, 2002 and i didn't notice because it picked up the recid when the page loaded, just not when you went to edit it. oh well, it's all good now. that's a good idea though, to copy the code somewhere where the colors change. Dreamweaver doesn't pick up on that stuff since it's inside the < > tags. Thanks again for all your help. -Carrie
Recommended Posts
This topic is 8325 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