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.

Passing a token from one page to another?

Featured Replies

Hi there,

I am trying desperately to find a solution to the following problem.

I have two DB's, TASKLOG.fp5 and JOURNAL.fp5:

TASKLOG.fp5 - contains individual problem tickets for customers.

JOURNAL.fp5 - contains the multiple Actions on the individual tickets.

Background; a new problem ticket is added to the DB for a customer. The Actions for the ticket are displayed via a Portal in the TASKLOG DB layout.

I have three CDML pages:

default.htm - The user selects the 'customer name' from a drop down field and clicks a button to find all the tickets for that customer. The selected 'customer name' is passed to the next page using a token.

results.htm - The token is then used to search the TASKLOG DB and the results are displayed.

portal.htm - I would like it to display some info from TASKLOG and the related Actions from JOURNAL.

The two DB's are linked via 'Ticket No'. (i.e. there is a unique Ticket No in TASKLOG for each ticket linked to the same 'Ticket No' for each Action in JOURNAL)

I am trying to link to another page where a some of the info from TASKLOG is displayed, AND all of the related Actions from JOURNAL are displayed for the chosen customer.

I have currently got the 'Ticket No' on results.htm to link to portal.htm and display all of the related Actions for that ticket, but I need to display the info from TASKLOG for the chosen customer in portal.htm.

As far as I can see, I need to pass the 'customer name' token from results.htm to portal.htm so that I can search using it again, but I can't figure out how to do it?

I may have hundreds of tickets for a customer so I am guessing that I can not use multiple tokens for this problem, is that right??

Can anyone please put me on the right track? I have been searching the forum and my references, but i'm not sure what it is I should be looking for in order to solve this!

All help and guidance greatly appreiciated! smile.gif

Assigning a Token is:

<input type="hidden" name="-token" value="[FMP-Field:customer name]">

Passing a token for a search can be like this:

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

Hope this helps.

Garry

  • Author

I think I have already managed to do that. I pass the 'customer name' using a token from the default.htm to the results.htm and perform the search on that.

What I really want to do is to pass the token on again to ANOTHER page (portal.htm), so I can perform another search using the same token.

It doesn't work when I put <input type="hidden" name="customer name" value="[FMP-CurrentToken]"> into the portal.htm page?

Do you know how to pass the token on again to another page, or what area/tag I should be looking at to find out how to do it please?

Many thanks

Hi again Bunny,

Try the FMP-InlineAction tags. They can be very effective for what you are describing.

Here is how to pass a Token:

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

All the best.

Garry

Hi Bunny,

The passing of a Token in CDML is quite simple, provided you have good practices in your design.

If you are going to create links to other files, formats, etc. using the [FMP-Link] tag will speed up your programming and will ensure that all the parameters (except for those you specify with new values) will be passed to the new action.

If you are going to perform another form action, and you are wanting to pass the token through this form, you will need to use the following:

<input type="hidden" name="-token.X" value="[FMP-CurrentToken:X]">

With regards to mutliple tokens, FMP5 can handle up to 10 different tokens simultaneously. They are specified in the format noted above, where X is the token number being between 0 and 9. If no number is placed there (ie "-token" and "[FMP-CurrentToken]") then 0 is assumed.

As mentioned in a post above, InlineActions may assist in the display of the related data from these other files, or possibly using Portals, as these will allow the different results from the different files to be displayed on the same format file.

For further information on Tokens, FMP-Link, InlineActions and Portals, consult your CDML Definitions file which should be available from FileMaker.

Luke

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.