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.

Token problems with a calculated field making link

Featured Replies

Would an [FMP-IncludeField:] work better. I think it will process any tags within the field. I haven't tested it!

Good Luck.

Garry

I have a company store application where customers obtain an order ID number when they enter the store. This ID number has to follow them throughout the store. Currently token passing makes this work fine. But now I have a page (a categorized catalog page) that a customer can choose while in the store to get a differently sorted perspective on what we offer. It takes them to a page based on a category database. This database has a calculation field that shows an image with an HTML link so that the customer can jump back to the purchasing area for the item.

The field is set on the web page using

[FMP-Field: ProductINCategories::GoToHitlistCalc,Raw]

This calculation field contains this formula:

"<a href=

""http://www.abc.com/ABCStore/FMPro?-db=Products.fp5&-lay=CGI&-token.1=[FMP-currenttoken:1]&-format=newhitlist.htm&ProductRecordID="&ProductID & "&-find"">"&"<img src=""http://www.abc.com/EnPurch/1images/moreinfo.gif"" BORDER=0 alt=""Click here to receive more information"">"

THE ABOVE FORMULA prepares the URL so it looks like this (example:)

<a href= "http://www.abc.com/ABCStore/FMPro?-db=Products.fp5&-lay=CGI&-token.1=[FMP-currenttoken:1]&-format=newhitlist.htm&ProductRecordID=CB0000001661&-find"><img src="http://www.abc.com/EnPurch/1images/moreinfo.gif" BORDER=0 alt="Click here to receive more information">

The RecordID changes for each record that appears on the list.

The problem is that the --- token.1=[FMP-currenttoken:1]--- part of the formula will not grab the current token.

I have discovered that a regular type link that is NOT generated by a field using [FMP-Field: fieldname,Raw] picks up the token just fine and sends the user back where they need to go. But this type link cannot be dynamic, so I can't use it.

I have had great luck with calculated fields preparing links but this token problem is a stumper.

Any ideas?

Thanks for responding.

I used http://www.cdml.org/ (helpful for newbies like me)

to look up the syntax of:

[FMP-IncludeField]

Description :

[FMP-IncludeField] is replaced with the contents of a field, usually a text field that contains an HTML format file.

Syntax

[FMP-IncludeField: Fieldname ]

----------------------------------------

My field contained a URL, not a format file, so when I tried this tag i got processing errors.

Anyhow...

I still don't know why the "Raw" field would not pick up my current token, but putting the following link under a button within the [FMP-Portal] [/FMP-Portal] tags seemed to grab the token and the productID.

&-format=newhitlist.htm&ProductRecordID=[FMP-Field:ProductINCategories::ProductID]&-find"]http://www.abc.com/ABCStore/FMPro?-db=Products.fp5&-lay=CGI&-token.1=[FMP-currenttoken:1]&-format=newhitlist.htm&ProductRecordID=[FMP-Field:ProductINCategories::ProductID]&-find"

  • Author

I have just done some testing. With a field called 'my_html' and the contents being:

My URL is: [FMP-CurrentToken]

and a format file (hworld.html) containing:

[FMP-IncludeField:my_html] (amongst other html and cdml)

This URL returns a page with the desired result:

http://localhost:1154/FMPro?-db=combotest.fp5&-layid=1&-format=hworld.ht ml&-token=hello&-recid=1&-find

Hope this helps.

Garry

[ February 12, 2002, 09:30 PM: Message edited by: Garry Claridge ]

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.