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.

Featured Replies

Working on a CD shop with FMP 6 and CDML I want to send the visitor from the welcome page to a list of the 10 newest CDs and open a new order record at the same time. This is not so difficult: I make the new order record while sending the visitor to the page where the CDs are listed using an inline action.

My problem is to get the token of the new order record. I need to pass it along when the visitor clicks on a CD. But when he clicks on the CD it's the RecID of the CD and not the RecID of the order record. Probably I should get the token while creating the page. But how can this be done?

Thanks for any hint

PJ Wassermann

If you create a new record with "-new" you can get the RecID in the next page with the [FMP-CurrentRecID]. You can assign this to a "Token" with:

<input type="hidden" name="Token" value="[FMP-CurrentRecID]">

You can then reuse it with "-edit" like this:

<input type="hidden" name="-recid" value="[FMP-CurrentToken]">

Good Luck.

Garry

  • Author

If you create a new record with "-new" you can get the RecID in the next page with the [FMP-CurrentRecID]. You can assign this to a "Token" with:

<input type="hidden" name="Token" value="[FMP-CurrentRecID]">

Hi Garry, greets to Australia!

Sure this works but my problem is that on this next page I have CDs listed. If someone clicks on a CD (for detail view or buying) then he gets the recID of the CD into the token and not the recID of the new order record.

Can I use inlineAction to get the token filled while creating the page?

kind regards

PJ Wassermann

If you are using Links to goto a listed CD then you may be able to do it with a little bit of Javascript:

[FMP-InlineAction: ......., -new]

<script>newrecid = "[FMP-CurrentRecID]";</script>

[/FMP-InlineAction]

[FMP-Record]

...List of CDs

<script>print("[FMP-Field:cdname] ....<a href='FMPro?-db=....&-Token=" + newrecid + "&-find'>View Details</a>");</script>

[/FMP-Record]

Hope this helps. All the best.

Garry

  • Author

That looks like a great idea - thanks a lot!

PJ Wassermann

  • 2 months later...
  • Author

Hi Garry

I was so busy with other stuff that only now I started to come back to this problem. I tried:

[FMP-InlineAction: -db=miOrder.fp5, -lay=all_Order, -new]

CurrentRecID]";

[/FMP-InlineAction]

No new dataset is created. What's wrong with the inline action?

kind regards

PJ Wassermann

Try removing the "-lay=all_Order,"!

This one works for me:

 [FMP-InlineAction: -db=combotest.fp5, -new]

 

 [/FMP-InlineAction]

Good Luck.

Garry

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.