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.

Combining Tokens & Value Lists

Featured Replies

Hi all...

I have a online database set up for my fellow teachers to enter student data into. With some reading and experimenting, after finally updating my Filemaker to version 6, I can now use multiple tokens!!! (pretty cool...)

I understand how to set & pass a token between pages, but would like to now combine it with a value list so that the token data appears in the field first, but the user can click on it and get the value list (from the .fp5 database) instead. I was previously using a just value list in the field and am trying to save time for the teacher to enter multiple records.

Is there a way to do this?

Thanks, in advance for reading this and your help!!!

Brendon

Try:

<select name="myfield">

<option value="[FMP-CurrentToken]">[FMP-CurrentToken]</option>

[FMP-ValueList:myfield]

<option value="[FMP-ValueListItem]">[FMP-ValueListItem]</option>

[/FMP-ValueList]

</select>

Good Luck.

Garry

  • Author

Garry,

Thanks for the reply. I tried your suggestion, and with a little modification, I'm close.

<select name="teacher">

<option value="[FMP-CurrentToken]">[FMP-CurrentToken]</option>

[FMP-ValueList:teacher, list=teacher]

<option value="[FMP-ValueListItem]">[FMP-ValueListItem]</option>

[/FMP-ValueList]

</select>

I chose teacher for the name of the field & the name of the value list in my .fp5 database.

If I use what is listed above, I am able to save anything from the valuelist correctly, but I then am unable to set/pass my token.

If I change the cdml to:

<select name="-token">

<option value="[FMP-CurrentToken]">[FMP-CurrentToken]</option>

[FMP-ValueList:teacher, list=teacher]

<option value="[FMP-ValueListItem]">[FMP-ValueListItem]</option>

[/FMP-ValueList]

</select>

now, I'm able to set/pass the token and see it (as well as the valuelist items) when I go to enter anothe record, but I save no information to the field "teacher" on the .fp5 database. Interesting thing though, I have the field teacher set as a required, not empty field, but it saves the record with nothing in the teacher field anyway.

What am I missing?

thanks again for the help!!!

Brendon

So, I'm close, but still a step off

You will need to use some Javascript.

In the HEAD tags:

<script>

function modform()

{

with (document.myform)

{

elements['-token'].value = teacher.options[teacher.selectedIndex].value;

submit();

};

};

</script>

In the BODY:

<form name="myform" onsubmit="modform(); return false;" ......

.....

<input type="hidden" name="-token" value="">

<select name="teacher">

<option value="[FMP-CurrentToken]">[FMP-CurrentToken]</option>

[FMP-ValueList:teacher, list=teacher]

<option value="[FMP-ValueListItem]">[FMP-ValueListItem]</option>

[/FMP-ValueList]

</select>

......

Hope this is of value.

Garry

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.