4 Replies Latest reply on May 15, 2014 4:48 AM by mikebeargie

    How to show value list according to field name

    aanshi

      I used separtion model. I divied whole project in DB and UI. Now in UI I want to show value list acconding to field.E.g If I selected dessert than ,Ice creame cake etc value list have to show and If I select dinner than related to dinner item want to show. How to perform this ?FIles are hosted on server and I have separate value list .So dont want to use related field.

        • 1. Re: How to show value list according to field name
          mikebeargie

          The best way to have a single dynamic value list, that changes values based on a selection, is by using related values. Since you said you do not want to do that, you really only have the option of creating separate value lists for all possible sub-sets of data you wish to select.

           

          In FM13, you have the luxury of being able to "Hide object when", so you could stack a number of fields with different value lists on top of each other, and hide the ones you don't need.

           

          But the best way would be to have a related table of your values, and show related values based on what is selected.

           

          Another alternative would be to have a global text field that stores your values, and have it update based on a trigger of what was selected in your determining field. However, this can be tricky to do, especially in list views and portals.

          • 2. Re: How to show value list according to field name
            aanshi

            I tried this option by using related value.But not get succes in this

            What I did

            Aim : Show job type based on department

             

            1. Created relationship(Self Joining)

            2.Create Value list(Value from Job type condition value)

            3. Job type condition value field set as calculation field

            Case(EX_Department Code="Core";ValueListItems("UI";"Core");

            EX_Department Code="Major";ValueListItems("UI";"Major"););

            Here UI is interface and field are created in DB

             

            I added screen shot

            • 3. Re: How to show value list according to field name
              davehob

              I would do as Mike suggested (which I don't think is what you tried), and have a separate table of Job Types, each of which seems to be categorised as either “Core” or “Major”.  Then in the Jobs table, have a global field, e.g. JobTypeSelector, which can be set to either “Core” or “Major” (via radio buttons? checkbox? value list if there are more options?).  Then make a relationship between Jobs and Job Types via this field, ie Jobs::JobTypeSelector = JobTypes::Type, with the value list showing only related values only via this relationship.

               

              I've attached an example, with an extra bit of functionality to show all values if no "Type" is selected.

               

              Dave

              • 4. Re: How to show value list according to field name
                mikebeargie

                I would even go a step further and remove the global field. If you’re setting up a table, it just makes sense to add an indicator field for “core” or “major” so that it can just be completely relational without needing to set globals for the list to change.