April 23, 200322 yr 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?
April 23, 200322 yr Author 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?
April 25, 200322 yr 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
May 8, 200322 yr Author 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)?
May 8, 200322 yr 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]
July 5, 200322 yr Author Thanks, Anatoli! This will help me. By the way, I already have a copy of what I thought was the "complete CDML tag reference" which I found at: http://www.kw.nl/~pike/DocZ/filemaker/CDMLref.htm But this only mentions the possibility of a single token and doesn't describe Token.X. Is there a more complete CDML tag reference somewhere else?
July 5, 200322 yr 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.
Create an account or sign in to comment