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.

adding record to portals with CDML

Featured Replies

Hello, I have an online db with a portal, using fmpro5.5. I can't get portals on the site to display with the new line below (like is displayed in built in publishing). I can only use cdml-portals to show the existing portal data. How can I enter new data to add records to the portal.

I have seen elsewhere that it may be possible to do this with an Inline action tag to create that new record in the related database when the page loads (and the portal should show it as long as the -inline is above it on the web page), but I cannot figure out the syntax that one might use to make this happen, as it does not seem to be well covered in the dev guide.

Thx for help!

I've never done this, but can't you add a faux "row" just below the portal that contains the hard-coded CDML to generate the functionality you want?

(This assumes you are using Custom web publishing of course.)

  • Author

I'm willing to try anything, but what would that look like.

I have the following code (and yes I'm using custom publishing) which displays the portal values as pop up menus vertically

[FMP-Portal: Collaborators]

<select name='Collaborators::CollaboratorName' size="1"> [FMP-Option: Collaborators::CollaboratorName] <br> </select>

[/FMP-Portal]

Well that's the part I'm not sure of! The trick though is to realise that this faux row is actually not part of the portal, it's beneath it.

Depending on how you want it to look etc, it might be something as simple as a link that generates the codes that create a new record in the related database and insert the master key into the match field for the current master record, that changes to a suitable form for data entry with a -new action. Or the faux row could be the form itself with all the boxes for field entry.

You *don't* want new blank records being created in your database every time somebody hits or reloads the page!

  • Author

I see now about the faux line not being a part of the portal

I tried this, but it fails miserably. Some how it places all of the already entered portal values, plus the one I want into the next portal record. Is there a way to tell it to find out the last portal row, add one, and then place the new selection in the next one?

<div align="center">

[FMP-Portal: Collaborators]

<select name='Collaborators::CollaboratorName' size="1"> [FMP-Option: Collaborators::CollaboratorName] <br>

</select>

[/FMP-Portal]

</div>

<div align="center">

<SELECT NAME='Collaborators::CollaboratorName' SIZE=1 > <OPTION VALUE=""> - No Selection - [FMP-VALUELIST: Collaborators::CollaboratorName, LIST=collaborator] <option [FMP-ValueListItem]>[FMP-VALUELISTITEM][/FMP-VALUELIST]

</SELECT>

</div>

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.