Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi,

We have two related databases - one is People.fm5, and the other is Events.fm5. Each record in Events has to refer to one of the people in People.fm5. So we relate the two with a unique ID number, and a portal in People finds all the events for each person.

The problem is, a dozen users will be creating records in the Events db, and they have to enter the correct ID number out of about 200, which is a drag. So I want to allow them to search the People db, and click on a link for the right person that will call up a format file for a new record in the Events db.

How do I get the ID number (which is known in the People db) autoentered into a field in that "new-filled" format file? And other fields too? I don't want to do it by a lookup in the Events db because I also need to allow people to just type those things into a blank new page. I thought I could do it via CDML but I haven't figured out how yet. I guess I don't know exactly how values come and go from those fields in format files. Or is this the place for a token? And how do tokens come and go?

Posted

Maybe this isn't so hard after all. I got a token working so that it enters the ID number - that was the critical part. In the form that generates the new page I used

Input type="hidden" Name="-token" Value="[FMP-Field: ID]"

and in the new page I used:

Input type="text" Name="ID" Value="[FMP-CurrentToken]"

This passed the ID number to the new page.

Now how do I do this with other data at the same time, such as names? Can I have more than one token at once?

Posted

Once you've passed and entered the ID in the proper field just set up the other fields in Events.fp5 to look up proper info from the People.fp5 file

  • 2 weeks later...
Posted

Thanks, Pupiweb and Anatoli.

I set up the lookups for the other fields and they work great for this after all. (Never mind what I was thinking before.)

Anatoli, how do you specify which token is which? I tried "token2" and it didn't recognize it. And doesn't the web browser have to keep track of the token(s)?

Posted

Get the CDML reference:

Up to nine tokens can be used by using a slightly different syntax for the token tags.

(Anatoli -- that is in fact 10)

The variable tag -Token can have an optional token specifier of the form -Token.X where X can be the characters 0 through 9.

If no period follows the -Token keyword then token one is implied.

To retrieve the value of a token the FMP-CurrentToken will accept another parameter that is a number, of value 0 through 9.

If there is no number parameter, but there is a period, then token zero would be returned.

and:

Example format file snippet:

<!-- Pass the value of token three onto the next request -->

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

Tokens can be used on the right side of an FMP-If using the intratag replacement syntax:

[FMP-If: CurrentToken:5.eq.{CurrentToken:6}]

<B>Token 5 equals token 6.</B>

[/FMP-If]

  • 1 month later...
Posted

If there is just single Token, it must be from FM version 4.

From FM5 there is 10 Tokens and Inlines and more. Search forums and the CDML reference will show up.

This topic is 7803 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.