Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 8499 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

Hi, hopefully someone can help me here!

I need to store the value of [fmp-link] somewhere, so it can be reused later. For example

I want to do the following:

-SEARCH SCREEN

Let the user specify search criteria.

Perform the search.

-SEARCH RESULTS

Display a summary list of returned records.

Let the use click on a record id to edit the details

-UPDATE SCREEN

Let them update the details.

-back to the SEARCH RESULTS

And finally, (the part I can't work out how to do) - Perform the original search again to show the updated results.

Is it possible to store [fmp-link] into a cookie?

Thanks for any help on this one - I'm getting more bald all the time.

Nathan

Posted

>Is it possible to store [fmp-link] into a cookie?<

Try it and find out.

Otherwise -token. If you are using FMP4 you get only one. If you are using FMP5 you get up to 10. You should be able to do it with tokens since they can be passed from format file to format file.

Peace

Keith M. Davie

  • Newbies
Posted

>Is it possible to store [fmp-link] into a cookie?<

Thanks for the suggestions, if I try to set a cookie to fmp-link as follows, the cookie just gets set to "%5bfmp-link"

[FMP-SetCookie: lastsearch=[fmp-link], Expires=3600 , Path=xyz ]

The other alternative was to use tokens, unfortunately, when I set a token to [fmp-link] as part of an href, Filemaker gives tries to load the format file mentioned in the token (hitlist.html) rather than "view_details.html" as intended.

In html file:

<a href="FMPro?-db=abc.fp5&

-lay=entry&-format=/view_details.html&

-error=/error2.html&

-token.0=[fmp-link]&

-Recid=[fmp-currentrecid]&

-find">view

</a>

Generates the following:

http://192.168.15.109:591/FMPro?-db=abc.fp5&-lay=entry&-format=/view_details.html&-error=/temperror2.html&-token.0=FMPro?-db=abc.fp5&-format=%2fhitlist.html&-lay=entry&-find=&-Reci d=33109&-find

Any help with this one is much appreciated.

Regards,

Nathan

  • 7 months later...
Posted

you could do it with tokens but not cookies, the downside to cookies is that they can be set to literal text or field values only (unless using Lasso). The tokens are snowballs...good for short shots. Not going to do anything good for you long term. What I mean by this is you have not stated how LONG you would like to store this data. If not any longer than the users visit, use a TOKEN (or don't they are really cheap anyhow, get into javascripting and variables). If you would like that link the next time that they hit your site then use a creative way around not being able to set a cookie to a FMP function. Set a BS field you create in a database that does nothing but create a new record equal to the [FMP-LINKRECID] tag. Now you can set the cookie to that field value. If using javascripting, you can have the FMP-LINKRECID in a hidden field, which javascripting sets to a javascript cookie i.e. you create the cookie using javascripting and the value for it would be : "document.formName.bsFieldName.value" where bsFieldName would be the name of the hidden field on the page (you could even have that in a different form so that it doesn't have to exist in FIleMaker as they will never submit that other form). I understand that you are just starting out in HTML, so if you just want the snowball method, choose a TOKEN, otherwise get a BS database or learn javascripting.

This topic is 8499 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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