Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

using a form within a relatedset record

Featured Replies

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!

  • Author

I get the same error using

Anyone have a clue?

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

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.

  • 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?

You can use the XSLT document() function. But beware of the problems that were discussed in this and the FMSA forum.

AnFrush is right with his/her analysis of your code - but I automatically corrected it with my example :smirk:

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!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.