Report An Issue is intended for Reporting Possible Software bugs. Questions on how to work with FileMaker Pro should be posted in the FM Pro Forum Section. (See tab at top of this screen.)
If (not IsEmpty (FilterValues (ODAS::Certification Scope; "Wild Crop")); "Yes"; "No")
Should return "Yes" if the check box for "Wild Crop" is selected in Certification Scope. Make sure that this field is defined to be of type text as that is the most likely reason you are getting "No" when you expect to get "Yes". You might also need to double check that the "Wild Crop" is, character for character, exactly the value specified in your value list for selecting this option. If there's an extra or missing character--such as a space character, then you'll get "No" when you expect "Yes".
You might also want to rethink the structure of your tables with regards to these check boxes. A table of related records where selecting a value such as "Wild Crop" creates a new related record for that value can, in many cases make for much easier and simpler reports based on this information. It could, for example, make it much easier to to report how many records have "Wild Crop" selected.
And it is possible to still present the user with what looks and acts like a list of check boxes for selecting values when you use such a structure.
Thanks for the reply PhilMod.
I did think about exactly what you indicated above before reporting my problem, making sure that the spelling is correct and that there aren't any additional characters/spaces. Unfortunately for this situation, everything was correct. However, can you let me know if this calculation would perform the way that I have it created? Should it do what I want it to do?
With regards to changing the structure, the "parent" checkboxes are part of a number of different "child" layouts that flow into other parts of my database. The checkboxes serve the purpose that I need them to, however, when I need to report to my government agency, they want to see a Yes/No, not "Wild Crop" (would be so much easier if we could just do the wild crop thing instead of the yes/no thing).
Is there another possible calculation that will just simplify this whole thing? I'm sorry to be a bother and I'm not 100% sure about the calculations.
Thanks for any feedback.
Thank you for your posts.
Your calculation looks fine. However, check to see if either your calculation or your check box value "Wild Crop" contains an extra space between the words. That is, if you have Wild <space> <space> Crop in the value list, the calculation would return false (and "No").
How many entries in your checkbox value list contain the word "Wild"? How many contain the word "Crop"? In essence, I'm trying to find another way to find the data by simply shortening the FilterValue. See if that is an option.
If this still fails, try using either the Position function or PatternCount function. For example:
If ( Position ( ODAS::Certification Scope ; "Wild Crop" ; 1 ; 1 ) > 0 ; "Yes" ; "No" )
If ( PatternCount ( ODAS::Certification Scope ; "Wild Crop" ) > 0 ; "Yes" ; "No" )
Keep us informed with any progress.
Thank you for your post, as well. I tried your "Position" calculation, and that didn't provide the results I expected, either. Sorry.
Maybe I need to give you a little more information.
I have a checkbox with 5 different values (from the value list). All five of the values could be checked or only one of the values could be checked. (Values include "Crops", "Livestock", "Wild Crop", and "Processing/Handling")
With regard to the calculation, no matter how many boxes are checked, I have to indicate in a yes/no response if my client has a "Crops" value, even if "Crops" and "Livestock" values are both checked.
I tried to do this calculation... If (IsEmpty (FiltverValues (ValueListItems (ODAS:Certification Scope; "Crops");"Yes")"No") ... and the programing didn't turn out the expect result.
Is what I'm asking for possible?
If the Position function returned zero, then the value didn't exist in the field. When you check a Checkbox, that value is entered into the field. When you check multiple values, each value is entered into the field and separated with an ASCII-29 character.
In your second calculation, it will result in "Yes" if "Crops" doesn't exist, and "No" when it does exist. What results are you getting?
Although you only listed four of the five values, try setting the search string to "Wild" (since it doesn't appear in the other values). Does this work? If not, what values are you getting?
Try putting another instance of the field on the layout, but set it to Edit Box. Make sure the values are in the field.
Continue to keep me updated with any changes.
The calculation you are using should work. Is Certification Scope a field of type text or number? If it's number, that might explain why it doesn't work.
Here's a demo file that uses exactly what you describe and it works for me: https://dl.dropboxusercontent.com/u/78737945/CheckBoxSelectionDemo.fmp12
It's a type Text that is indexed, by Value List, Allow Override.
Will look at your link and post further if needed.
Copied it, pasted it, modified it to the correct data field, and I'm still getting no when the crops box it checked (I'm sorry, I'm using Crops as my test field, not Wild Crop).
Would the options have a possible impact on the programming?
Let me take a look at your file to determine why it isn't working. Check your Inbox at the top of this page for instructions where to send your file.
Any luck after I sent you the file?
I have not received your file. Please try again.
If the file is larger than 10MB, then compress the file, and send me the resulting zip file. If still too large, then place the file on a server I can download from (Dropbox?), or use a third-party hosting service like sendspace.com that hosts files up to 300MB at no charge.