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

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

Recommended Posts

Posted

Hi Folks,

Having done some basic research on this outstanding forum, I am approching the conclusion that there is a fundamental problem in applying [FMP-Option] in custom web designs with Filemaker. Is this correct?

For example, from my CDML reference guide, I would expect the following...

<select name="Groups">

[FMP-option: institutions]

</select>

...to generate a pop-up menu of form inputs that are the values of my valuelist associated with the field called "institutions." (Given that I already designated the correct value list for this field, the correct database, the form action, etc.)

Do I sound like I'm on the right track? Is the use of [FMP-Option] problematic?

Many thanks,

Rob

Posted

It is not problematic; your perception is a bit of track.

RE: valuelist associated with the field called "institutions."

You must specify the value list and not the field where you use the value list.

quote:

<select name="Groups">

[FMP-option: Groups, list=GroupList]

</select>

Posted

The only thing that doesn't work over the web is relational value lists.

Posted

oh, ok. Well, I have tried that syntzx also, naming the field that uses the valuelist as well as the valuelist itself. I must be doing something else incorrectly. Thanks for the insight, though. Can't blame it on valuelists not working!

Rob

Posted

One last statement of bafflement...I have gone directly in opposition to the principle of using FMP-option and just went ahead and coded the HTML <option>s...about 200 of them.

I used the following, where "pilastname" is the name of the field, and "pilast" is the name of the value list.

<select name="pilastname">

[FMP-option tongue.gif" border="0ilastname, list=pilast]

</select>

Also, I designated the correct database and layout in the beginning of the form. The search works fine with the HTML I labored out, and I've resigned myself to that for now, but I am absolutely puzzled as to why the FMP-option value list is not working! It seems like it should be a very simple function. The value list is not relational, I don't believe, so... ??

One thought I had was when viewed in Filemaker, the value list is defined as a "from field" value list. In other words, the values of the list are summoned from the data that already exist in the field. Therefore, one can not view the values within the define valuelist function of Filemaker Pro. However, I tried another valuelist using comparable syntax as above, but employing a valuelist that is a "custom list."

Alas, the FMP-option function online did not work...again.

Ideas, oh gurus of FM??

Mer

Posted

Rob, it sounds like you already have a db file with valuelists in a layout. Make a duplicate layout. Now the field which is the valuelist in this duplicate layout- change its format to standard. Now go back to browse mode and look at a few of the existing records in this layout. You should note that whatever was selected in the valuelist is being displayed as text in the standard field.

So what you do is in your web layout designate the field as a standard field. You can construct your lists as an html pop-up directed to that field in web layout. That list can agree with your already established valuelist. Whatever the client selects is then entered as text in the standard field. Anyone accessing the layout with the valuelist pop-up menu will see that the selections have been made. In other words - just use an html pop-up and send it to a field in a layout which has standard formatting.

I don't know how good the [fmp-option] is, but it is entirely unnecessary to accomplish that which you desire. It is another tag for which I have found no use because there are easier, more effective ways to approach the problem.

Posted

Thank you all for your help. Brian, I tried what you suggested. I made a duplicate layout, and changed the field to a standard field. You were correct; the text did appear in the field. Unfortunately, the valuelist still did not work online. Can't figure it out, but I'm moving on...other fish to fry. <!>

Thank you all again,

R

Posted

Rob, The valuelist was not to be used. Write a simple html pop-up menu which lists the same values as your valulist and direct that html to the standard field in the web layout through cdml as your -edit or -new action.

If you aren't following this let me know. I might have a sample of the code I can share.

Posted

To get pop-up menus to work you'll need:

<select name="fieldname">

[FMP-Option: fieldname, list=listname]

</select>

You also need to have the field on the specified layout. As a rule I format the field as I want it to appear on the page ie, I'd have it as a pop-up list. The value list can be either custom or based on a field, but NOT relational. Relational value lists don't work over the web interface.

But wait, there is more: if you view the page by directly typing the url into your browser, you'll just see the CDML codes. In order to generate the value list and checkboxes the page needs to be *processed* by Web Companion. This is done by specifying a url that includes the databasebase name, layout, format file, error page and an action tag, usually -view or -findany or -findall (the difference being that -view does not force authentication).

path/FMPro?-db=database&-lay=layout&-format=file.html&=error=error.html&-view

Theoretically you can leave out the -lay and -error tags and it'll still work.

Posted

RE: Relational value lists don't work over the web interface.

It depends. Maybe not Relational between value lists, but Relational based on Values from related file, then yes, it will work.

Posted

I used the HTML workaround. i.e. I made the field a standard field, then used HTML for a pop-up menu that directed the input to the appropriate field. Thanks for all your help...I would still like to make the value list thing work one day, but not today. Thank you all for your help on this.

Posted

I use a lot of valuelists. Here are the steps I use to trouble-shoot. I don't know how much you know, so I'm gonna be very basic - please don't take offense if its too basic (or too long!):

1) Most important step, easiest to overlook/misunderstand.

Check to make sure the valuelist is defined in the database you are calling up when the HTML page is displayed. And remember, the valuelist must be in the database used to display the HTML page, not the database the HTML page will add/edit.

Lets say -db "A" is Worksites, and -db "B" is Services. You are looking at "ListWorksites.htm", a list of all the worksites in a particular city. The page is set up so that clicking on the name of the worksite you want (worksite #3, for example) triggers the following url: FMPro?-db=Worksites&-lay=AddServices&-format=AddServices.htm&Number=3&-find (similar to what Vaughan described).

You are now looking at "AddServices.htm", which is set up to add a service record to -db=Services for the selected worksite. On this page, you want the field "TypeofService" to be a drop-down menu built from the values already contained in -db=Services field named 'TypeofService'. If your value list is only defined in -db=Services, it won't display this page because you haven't called up this database yet (look at the string..we asked for -db=Worksites, not -db=Services). To fix this problem, define a valuelist in -db=Worksites to 'use valuelist from another file'. Select the Services database, and choose the valuelist you want to use. Because the valuelist is now defined in -db=Worksites, it can be displayed on "AddServices.htm".

If you just have a hyperlink to the page you want to display the drop-down list, you still have to define the url so it will go to a database with the valuelist defined. The shortest url I've used for such a link is: <a href="FMPRO?-db=Database&-format=Page.htm&-view">Name of Link</a>

2) If you are just using a valuelist from a related file, it works well. But a relational valuelist - one where you have specified 'only related values' doesn't work with CDML coding. You may be able to get around this by defining a valuelist based on calculated and global fields. If you are using a calculated field for your list, be careful...sometimes using a calculated field that calls up data from another database acts like a relational valuelist.

3) I've never used [FMP-Option:...] I can't figure out the advantage of this tag. Instead...

For a drop-down menu on an add or search screen I use:

<Select name=FieldName size=1>

[FMP-ValueList:FieldName, List=FieldList]

<Option Value="[FMP-ValueListItem]">[FMP-ValueListItem]</Option>

[/FMP-ValueList]

</Select>

And for an Edit screen that shows the current field value, I use:

<Select name=FieldName size=1>

<option Value="[FMP-Field:FieldName]">[FMP-Field:FieldName]</Option>

[FMP-ValueList:FieldName, List=MyList]

<Option Value="[FMP-ValueListItem]">[FMP-ValueListItem]</Option>

[/FMP-ValueList]

</Select>

I hope this helps! smile.gif" border="0

Posted

Meltdown wrote...

"1) Most important step, easiest to overlook/misunderstand. Check to make sure the valuelist is defined in the database you are calling up when the HTML page is displayed. And remember, the valuelist must be in the database used to display the HTML page, not the database the HTML page will add/edit."

Ahhh, genius. I bet that's the problem. Good thinking 99.

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