Jump to content

Tokens


kele
 Share

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

Recommended Posts

Can some one give me some help in understanding the usage of Tokens

I have 3 values I am trying to pass from page to page to page.

When & where do I need to assign values to these tokens?

Everytime I leave a page?

Every time I enter a new page?

Just once?

<INPUT TYPE=hidden" NAME="-token.1" VALUE = "Client ID"

<INPUT TYPE=hidden" NAME="-token.2" VALUE = "Invoice ID"

<INPUT TYPE=hidden" NAME="-token.3" VALUE = "Consultant ID"

The way the site will work is first page a search for a client will be performed then you will be taken to a second page with a list of clients matching search criteria. I have used the FM-LINKRecID to go to a third page where the details of the client selected will be shown,

I want to be able to store that clients unique ID (Client ID) so that I can perform unassisted searches on related dbs to bring up appointment history and invoice history and also to be able to generate a new appointment or invoice for that client.

I have tried using the FM-PORTAL to accomplish viewing the history but have spent literally days on just one relationship and still cannot get it to work so I was thinking of just creating a link to go to a page showing either appointments or invoices and having the client ID passed by tokens.

Any help would be greatly appreciated.

TIA -

-Kele

Version: Developer v6

Platform: Mac OS X Jaguar

Link to comment
Share on other sites

On your third page (details) you can have:

<INPUT TYPE="hidden" NAME="-token.1" VALUE = "[FMP-Field:Client ID]">

<INPUT TYPE="hidden" NAME="-token.2" VALUE = "[FMP-Field:Invoice ID]">

<INPUT TYPE="hidden" NAME="-token.3" VALUE = "[FMP-Field:Consultant ID]">

Then on any following pages you can have:

<INPUT TYPE="hidden" NAME="-token.1" VALUE = "[FMP-CurrentToken:1]">

<INPUT TYPE="hidden" NAME="-token.2" VALUE = "[FMP-CurrentToken:2]">

<INPUT TYPE="hidden" NAME="-token.3" VALUE = "[FMP-CurrentToken:3]">

Or for a search use any of these:

<INPUT TYPE="text" NAME="ClientID" VALUE = "[FMP-CurrentToken:1]">

<INPUT TYPE="text" NAME="InvoiceID" VALUE = "[FMP-CurrentToken:2]">

<INPUT TYPE="text" NAME="ConsultantID" VALUE = "[FMP-CurrentToken:3]">

Good Luck.

Garry

p.s. Maybe you can show us how you are trying to implement the Portal.

Link to comment
Share on other sites

So then can I do something like the following:

<form action="FMPro" method="post">

<input type="hidden" name="-DB" value="appointments.fp5">

<input type="hidden" name="-Format" value="appointmentsearch.html">

<INPUT TYPE="text" NAME="Client ID" VALUE = "[FMP-CurrentToken:2]">

<input type="submit" name="-View" value="appointmentsearch.html">

</form>

Do I need a -Find instead of the -View?

I am confused by the Syntax example from the FMP CDML reference DB

Syntax example(s)

View a format file using a link

<a href="FMPro?-DB=Names.fp5&-Format=query.htm&-View">Take me to a search page</a>

So can I substitute my db name & format file name and add the Token value in there so that it only returns the records I am looking for? - or -

Do I need to

View a format file using a form action

<form action="FMPro" method="post">

<input type="hidden" name="-DB" value="Names.fp5">

<input type="hidden" name="-Format" value="query.htm">

<input type="submit" name="-View" value="View Search Page">

</form>

Adding in the line for my input of the token. I also am not clear on the "submit" line of this block -

I understand the -View says I want to just view the records not edit, add, find or delete. My question here I guess is the value - what would I substitute there or would I substitute anything.

I'm sure in my ignorance I am overly complicating things but I sure would appreciate clarification -

Many thanks -

-Kele

Link to comment
Share on other sites

"-view" only gives you very restricted access. It is handy for passing Tokens around if you are not using "-find" etc.

Your goto search/find Form may look like this, however only if you wish to pass a value along:

<form action="FMPro" method="post">

<input type="hidden" name="-DB" value="appointments.fp5">

<input type="hidden" name="-Format" value="appointmentsearch.html">

<INPUT TYPE="hidden" NAME="-token.2" VALUE = "[FMP-CurrentToken:2]">

<input type="submit" name="-view" value="GOTO Appointment Search">

</form>

then, your search Form may have this (however , only if you want the user to enter a new ClientID or Continue with the current one):

<form action="FMPro" method="post">

<input type="hidden" name="-DB" value="appointments.fp5">

<input type="hidden" name="-Format" value="appointmentlist.html">

<INPUT TYPE="text" NAME="Client ID" VALUE = "[FMP-CurrentToken:2]">

<input type="submit" name="-find" value="Show Appointments">

</form>

All the best.

Garry

Link to comment
Share on other sites

This topic is 6505 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
 Share

×
×
  • Create New...

Important Information

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