July 16, 200520 yr 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!
July 18, 200520 yr 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
July 20, 200520 yr 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.
July 22, 200520 yr Author 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?
July 23, 200520 yr You can use the XSLT document() function. But beware of the problems that were discussed in this and the FMSA forum.
July 23, 200520 yr AnFrush is right with his/her analysis of your code - but I automatically corrected it with my example :smirk:
July 25, 200520 yr 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!
Create an account or sign in to comment