RussellB Posted July 16, 2005 Posted July 16, 2005 Can someone tell me why this does not work? I want to insert a form within a relatedset record (records from the table "items") which allows the user to edit the "quantity" field. I am getting error code="101" (record is missing). item-edit.xsl edit Thanks!
RussellB Posted July 17, 2005 Author Posted July 17, 2005 I get the same error using Anyone have a clue?
Martin Brändle Posted July 18, 2005 Posted July 18, 2005 There are two problems with your code: First, you have the within a xsl:for-each loop, therefore multiple forms. The forms have no name attribute, so the browser can not distinguish them when submitting the data. Give them an unique name. Second, according to p. 78 of the CWP Guide a full qualified name and a portal row number must be specified for editing portal rows: table::field.rownumber item-edit.xsl Another way is to create a layout with the related table only and call this layout. Then you can use the record id of the portal rows as -recid and -edit as usual. HTW (hope this works), Martin
AnFrusch@pepp Posted July 20, 2005 Posted July 20, 2005 I agree with the previous post. Anyway I don't think the error is caused by the form name missing, the problem is this: you start to read the nodeset from fmrs:relatedset[@table='items']/fmrs:record[x] (x is the current position of the fmrs:record node), inside it there should not exists another fmrs:relatedset[... so you must write only @record-id to get the proper value. obviously to save the current record into a variable simplify your work (even if it is not necessary at all). I can tell that I don't think the portals are so confortable using XSLT, I usually include an external XML document getting it through an http call. Bye.
RussellB Posted July 22, 2005 Author Posted July 22, 2005 I can tell that I don't think the portals are so confortable using XSLT, I usually include an external XML document getting it through an http call. I'm starting to think the same but I have no experience calling an external document. Could you suggest how I might use such a call in this instance?
Martin Brändle Posted July 23, 2005 Posted July 23, 2005 You can use the XSLT document() function. But beware of the problems that were discussed in this and the FMSA forum.
Martin Brändle Posted July 23, 2005 Posted July 23, 2005 AnFrush is right with his/her analysis of your code - but I automatically corrected it with my example :smirk:
AnFrusch@pepp Posted July 25, 2005 Posted July 25, 2005 Hello, the way to include an external XML nodeset is this: Using FileMaker you should call a database, the query is the same but you must add in your 'master' xslt stylesheet the parameter before all the templates, then you can include an XML (or XSLT as well) document: the concat function is necessary because the $authenticated-xml parameter is needed before the db query. '& ;' is the HTML entities which stands for '&', if you don't use the entities the parser will cause an error. Once you get your related recordset, you can transform the XML tree but remember that you will start to read it from $ related-record/fmrs:fmresultset/etc.. Bye!
Recommended Posts
This topic is 7403 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