Jump to content
Sign in to follow this  
polydore

DwindlingValueList Sample - No Joy when match field is empty

Recommended Posts

I have been playing with the attached sample file for the dwindling value list, but have struck a problem in that the dwindling list only displays if there is already a value in the matchfield. If the matchfield is empty (or contains just a pilcrow) the value list doesn't display.

The value list depends on an inequality (≠) relationship between a calculated field and a related field from which the values are drawn, but Filemaker doesn't seem to evaluate it if the calculated matchfield is empty, even though the window is refreshed via a script.

http://fmforums.com/forum/attachment.php?attid/10308/

I have managed to work around it by having the calculation set a "nonsense" value if there is no valid relationship, but is there a better/more "elegant" way?

Share this post


Link to post
Share on other sites

In the calc, make following change:


// FOR VERSION 8.5:

"~¶"& List ( Affiliations::OrganizationID ) & "¶ " 



// FOR PREVIOUS VERSIONS:

// "~¶"& ValueListItems ( Get (FileName) ; "MyOrganizationsIDs" ) & "¶ "

...allthough there seems to be done something like it; a in the end, that you perhaps have ignored

--sd

Edited by Guest

Share this post


Link to post
Share on other sites

I am somewhat confused here. First, you say something doesn't work. To illustrate the point, you link to a file that DOES work. Next, Søren suggests how to fix the file that works. Is this a conspiracy to drive us crazy, or what?

Share this post


Link to post
Share on other sites

No I fixed something that already were fixed, only the quetioner havn't paid enough attention to the tiny after the final pilcrow.

--sd

Share this post


Link to post
Share on other sites

I fixed something that already were fixed

Exactly.

Share this post


Link to post
Share on other sites

I am somewhat confused here. First, you say something doesn't work. To illustrate the point, you link to a file that DOES work. Next, Søren suggests how to fix the file that works. Is this a conspiracy to drive us crazy, or what?

Thanks Comment. The file indeed does work.

After editing the Calc.

Attached is the calc as provided. I am using FMP8A and there is no "tiny space" after the final pilcrow. No conspiracy either.

Soren's post just pointed out that the calc for pre-8.5 versions needed to be finished off same as the 8.5 version.

AsProvided.png

Share this post


Link to post
Share on other sites

OK, now it makes a little more sense. I didn't notice your application version, and I have never tested the calc on version 8.

The strange thing is that it does work "as provided" in version 7 - but not in version 8.5, and apparently not in version 8 either (I don't have 8 installed).

The cure is indeed to change the calc to:

ValueListItems ( Get (FileName) ; "MyOrganizationsIDs" ) & "¶ "

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.