5 Replies Latest reply on Jun 28, 2013 10:06 AM by philmodjunk

    Value list 1....(field value)

    AndrewSadler

      Title

      Value list 1....(field value)

      Post

           Can I have a value list that will create a list of numbers from 1 to what every the value of a field is. For example in my case, I want people to be able to select a number of items to allocated, so say that there are 100 items the user could select 1 ..100 from the drop down list.

        • 1. Re: Value list 1....(field value)
          philmodjunk

               Will there be an upper limit to how large a value can be specified?

               If so, a conditional value list can use a relationship that links to a table of values where the relationship is:

               YourTable::SelectedValue > ValuesTable::Value

               If there is no upper limit, then you'd have to get a bit more creative. A recursive custom function (Got FileMaker Advanced?) can generate a return separated list of values in a calculation field, then a conditional value list can use a one to one self join to list only the values in this calculation field.

          • 2. Re: Value list 1....(field value)
            AndrewSadler

                 Thanks for your replay

                 Ok I have started a calculation to store the number list in the second part of you response. How do I make generate a return separated list of values, at the moment it is just adding each number together in the loop?

                  

                  

            • 3. Re: Value list 1....(field value)
              AndrewSadler

                   I managed to get the list of values which report correctly depending on the number of items remaing, however I cannot get this into the drop down box. For example I have two test values at the moment 1 - 2 and 1-9, but in the drop down menu I am just getting 1-9 for both. I dont think I can be implementing this part "then a conditional value list can use a one to one self join to list only the values in this calculation field.".

                   Any help would be great :)

                    

                    

              • 4. Re: Value list 1....(field value)
                JimMac

                     The separtaton character is call Pilcrow or ¶.  The is a "return" or "line return" or "Carriage return".  On my MacOS it is Alt 7.

                     Put a ¶ after each value you want to separte in your list.  Like 1¶2¶3¶4   .   Not the last item doesn't need a ¶.

                     Jim...

                • 5. Re: Value list 1....(field value)
                  philmodjunk

                       You need a self join relationship. Do you have a field in the table, such as an auto-entered serial number that uniquely identifies each record?

                       If so, you can link your current table to a new table occurrence of the same table like this:

                       YourTable::primaryKey = YourTable 2::PrimaryKey

                       That links each record to itself.

                       If you are interested, here's some stuff on conditional value lists.

                       Then open your value list in Manage Value Lists for editing and select: Include only related values, starting from YourTable 2. Keep the other settings the same as they seem correct from what you report.

                       There's a lot of overlap between the first two links so you can read one and skim the other. The demo file gives you several examples of different conditional value lists so you can examine them to see how they are set up. If you are using FileMaker 12, you can open this demo file from your File menu to get a converted copy of the demo file that you can examine in FileMaker 12.

                       The last link discusses how to set up a chain of conditional value lists where the value selected in each conditional value list controls the values listed in the next value list.

                       Forum Tutorial: Custom Value List?

                       Knowledgebase article: http://help.filemaker.com/app/answers/detail/a_id/5833/kw/conditional%20value%20list

                       Demo File: https://www.dropbox.com/s/j6qf0z9fnem3uxd/ConditionalValueListDemo.fp7

                       Hierarchical Conditional Value lists: Conditional Value List Question

                       Feel free to post follow up questions here if those links aren't enough to get your value lists working correctly.