6 Replies Latest reply on Jun 11, 2017 2:48 AM by philmodjunk

    Selecting fields from a value list


      I have a layout with vehicle expenses. At the moment when I select a category from a value list is is supposed to hide all fields except for the Category selected. But this is not very efficient and too easy to make an error for the script that hides these 14 fields.


      Is there a more efficient method of showing the correct price in the correct field for the relating Category selected. See screen shot attached.

        • 1. Re: Selecting fields from a value list

          I see no reason to hide fields in that layout. What problem are you solving by hiding fields? Can you provide an example?

          • 2. Re: Selecting fields from a value list

            You interface is cluttered beyond what words can describe, but keep in mind that when using a portal for data input, you can improve the situation by working at the portal:row level and specifying a different, eye-catching formatting for the active state as opposed to a mild formatting for the rest.


            Sometimes you want the speaking person to sound louder than the mass: one way is to pump up the mike volume, another way is to mute the mass.


            You built a bad interface and now trying to clean it up at the interaction level by hiding things in order to help people focus on a specific field.

            Think better, redesign the whole interface and you won't need tricks to fix what's broken at the root.

            • 3. Re: Selecting fields from a value list

              I was wanting a total for each category so I created a price field for each category and layered them on top of each other. Really messy. I started with one field but did not know how to get totals for each categor, which I need. I know there must be a simple way to do this but couldn't work it out.

              • 4. Re: Selecting fields from a value list

                Yes, there are better options. The same field can calculate different totals for different categories by using either a relationship or ExecuteSQL.

                • 5. Re: Selecting fields from a value list

                  Are there any examples if this. I am the first to admit that I need some help.

                  • 6. Re: Selecting fields from a value list

                    I can't provide a detailed example that matches your data model and how you want these totals to calculate as I don't know enough detail. Thus, the following example may need modification to fit your needs:


                    I can see that you have a layout, a portal and that your portal records are assigned to categories.


                    So you have a relationship for the portal, perhaps:


                    LayoutTableOccurrence::_pkLayoutTableID = PortalTableOccurrence::_fkLayoutTableID


                    But with different names


                    So you might set up this relationship:


                    PortalTableOccurrence::_fkLayoutTableID = PortalTO2::_fkLayoutTableID AND

                    PortalTableOccurrence::Category = PortalTO2::Category


                    Then a calculation field defined in your portal table to evaluate from the context of the portal's table occurrence: Sum ( PortalTO2::Cost ) will compute the total of all records of the same category that are linked to the same layout record.


                    PortalTO2 Is a second occurrence of your portal table.

                    1 of 1 people found this helpful