Jump to content

using a form within a relatedset record


RussellB

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

Recommended Posts

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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

'&amp ;' 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!

Link to comment
Share on other sites

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