Jump to content

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

Recommended Posts

Posted

I'm trying to have a drop down value list for a student that is found by the user. The value list should only contain dates that are related to this student. The dates are in a seperate file. The relationship is based on a unique student ID. This is weird, here is my CDML for my code for my value list .

<select name="T027 Test Date_text">

<option value="" SELECTED>--Select-- [FMP-OPTION:PretestDates,

list=PretestDates]

</select>

If I change the value list in my database to "Use Custom value" it works.

If I change the value list in my database to "Use value list for another file" it works.

If I change the value list in my database to "Use values from field: All values" it works.

If I change the value list in my database to "Use values from field: Related values" via a relationship, it DOES NOT WORK on the web page. It works in my database.

Why?

Can anyone help.

Posted

Relational value lists do not work in FM Web

Try with an Inline

<Select name="FieldName">

<option value=""> Select a value

[FMP-InlineAction:-db=Dates.fp5,-lay=cgi,Student={field:Student},-max=all,-find]

[FMP-Record]

<option value="[FMP-Field:Date]">

[FMP-Field:Date]</option>

[/FMP-Record]

[/FMP-InlineAction]

This will produce a list of dates related to a student

Posted

Relational value lists do not work in FM Web

Try with an Inline

<Select name="FieldName">

<option value=""> Select a value

[FMP-InlineAction:-db=Dates.fp5,-lay=cgi,Student={field:Student},-max=all,-find]

[FMP-Record]

<option value="[FMP-Field:Date]">

[FMP-Field:Date]</option>

[/FMP-Record]

[/FMP-InlineAction]

This will produce a list of dates related to a student

Thanks for your response. I just a little more help.

Can you explain how this works in general? What trigers the InlineAction?

[FMP-InlineAction:-db=Dates.fp5,-lay=cgi,Student={field:Student},-max=all,-find]

-db=Dates.fp5[color:"red"] (Is this the related database?)

[color:"black"] -lay=cgi [color:"red"] (What Layout are your refering to, do i need to have a layout name cgi? which file?)

[color:"black"] Student={field:Student}[color:"red"] (this I do not under stand at all).

[color:"black"] I hope its not to much trouble.

Posted

Nothing triggers the Inline; obviously you've to be calling FileMaker somehow, either with a -view, -find, -findany etc ... tag.When the page is loaded the Inline performs the action specified in it like -find ...

Details:

-db=Dates.fp5 is the file in which the Inline performs the search; doesn't need to be related to the current file

-lay=cgi is the layout to be used in the Dates.fp5 file; it's named cgi but you can name it as you like it best

Student={field:Student} tells FM to look for Students (in Dates.fp5) who have the same value of field Student of the current record in the current file

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