Jump to content

Why can't I use a non-numeric value in this value list?


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

Recommended Posts

Greets all:

I found the attached solution* to create a value list based on a calculation, but when I substitute the values in Field A's value list with non-numeric values, the solution fails. Why? I'd like to be able to replace W1, W2, and W3 with non-numeric values, but I can't see (by looking at the existing calcs) why the solution fails when you remove numbers from Field A's value list.

Cheers,

Rich

 

*https://community.claris.com/en/s/question/0D53w00005QdyVqCAJ/value-list-defined-by-a-calculation

Day Selector.fmp12

Edited by WF7A
Link to comment
Share on other sites

Radio buttons and check buttons are just a return-separated value list of items. If you decide to mid-stream change this value list and have records out in the wild you will need to do an extensive data cleanup to replace any existing values of W1 to X1 or 101. When dealing with a check box or radio button you may wish to format a field as just an entry text box to see the contents. If you have ever removed an item old records would still retain the item that is no longer present to select so reports or searches based on this will be inaccurate. 

 

  • Like 1
Link to comment
Share on other sites

44 minutes ago, WF7A said:

when I substitute the values in Field A's value list with non-numeric values, the solution fails. Why?

I only glanced at it, but I see that the calculation of DayListCalc is using the Choose() function, with Field A being the test parameter. This parameter is required to be an integer. When you supply a text value instead, Filemaker converts it to an integer. If the text contains no digits other than 0, then the converted parameter is 0. In such case, the first result parameter is returned - in your case, an empty string.

If you want to select from text values, then base the calculation on the Case() function instead.

 

 

  • Like 1
Link to comment
Share on other sites

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