10 Replies Latest reply on Mar 29, 2012 3:41 AM by LyndsayHowarth

    Calculated Value List with Favorites

    hrjacobi

      I have an invoice layout which is connected to my invoice table. Companies are related through the Company ID with the invoice table. Now in the invoice table I have a pulldown (value list) with account numbers (these are in a separate table). Now for most of the companies we always have to use the same account numbers. So I thought that it would be easy to make a value list which starts with some 'favorites' and then follows with the hole list.

      So far I've made in the Company table/layout that you can define the favorite accountnumbers with checkboxes which results in one field with only the selected favorites for that company.

      At this moment I have a calculation field in invoices which collects the favorites based on the relation to the company en the whole list from account numbers. Because I use a calculated field with relations a Value List doesn't support it and tells me that there's no index.

       

      Example how I would like it to work:

      Company A:

      19198

      18818

      18183

      ---------

      1324

      4567

      etc

       

      Company B:

      09809

      07337

      ---------

      1324

      4567

      etc

       

      Is there a way to build this?

       

      Thanks for the effort

        • 1. Re: Calculated Value List with Favorites
          LyndsayHowarth

          PLEASE IGNORE THIS... it does not work...

           

          If you stored the favourites in a field or calculated that field with a checkbox for the Company that marked them as "Favourite", you could have the valuelist sort according to the field. This would put the Favourites at the top of the list and place others undernearth (probably with Alphaumeric sorting).

           

          I have never tried this with a divider... but it would probably work if you added it as a literal at the end of the calculated field.

           

          HTH

          - Lyndsay

           

          Message was edited by: Lyndsay Howarth  PLEASE IGNORE THIS... it does not work...

          • 2. Re: Calculated Value List with Favorites
            comment

            Lyndsay,

             

            I am not quite sure what you mean myself.

            • 3. Re: Calculated Value List with Favorites
              LyndsayHowarth

              Michael,

               

              Having just gone to the solution to check my logic i must now very humbly say that I was wrong!

              I'm not sure where my brain was but I had just returned from the dentist...

               

              I'll edit it so people know not to pay attention...

               

              - Lyndsay

              • 4. Re: Calculated Value List with Favorites

                I don't believe the accounts can reside in the same value list (although I can be wrong).  But how about two value lists such as the attached?  You will need to sign into Tech Net to see and download the example file.  In the attached, the favorite value list is hidden under the button and grouped.  I use Go To Object [ dummy ] to remove the cursor from the field (without committing the record) after selection.

                 

                You might be able to stack (favorites on bottom of stack) and pop the favorites first then use triggers to either move to the next 'all' version or exit.  This all would depend upon whether you use pop-up or drop-down,  whether Mac or Windows, and which FM version.

                 

                Maybe this will at least get some additional ideas going.  :^)

                 

                Message was edited by: LaRetta:  UPDATE:  Corrected file name (blush) and attached the script trigger to remove the cursor from the favorites field.

                • 5. Re: Calculated Value List with Favorites
                  usbc

                  Just a quick reply and apologies if I misunderstand the question:

                  If you are designating the Favorites by having the User click on the layout -

                  You can add a number field for that table/relationship (for the value list) to sort by.

                  That same click can populate (set) this field with the next sequential number (serial number option).

                  Then sort the value list relationship by that field in descending order. This would place the most recently added Favorites at the top.

                  • 6. Re: Calculated Value List with Favorites
                    comment

                    I like this. I was about to suggest poping up a window with a portal or a list view, but this is much simpler to implement and quite workable.

                     

                     

                    LaRetta wrote:

                     

                    You might be able to stack (favorites on bottom of stack) and pop the favorites first

                     

                    You could also use a modifier key to select the value list, e.g. click for favorites, option-click for the full list.

                    • 7. Re: Calculated Value List with Favorites

                      I replaced the file because I had mistyped 'favorite' and I just couldn't leave it, LOL, and I had not attached the trigger to leave the field.  It looks a bit better now when you make the selection.

                      1 of 1 people found this helpful
                      • 8. Re: Calculated Value List with Favorites
                        hrjacobi

                        Thank you all ! Going to test the options

                        • 9. Re: Calculated Value List with Favorites
                          LyndsayHowarth

                          Yes... well done...

                          Although from our point of view you still spelt 'favourite' wrong... ;-)

                          - Lyndsay

                          • 10. Re: Calculated Value List with Favorites
                            LyndsayHowarth

                            That's a point...

                             

                            If the valuelist sorts by the second field which is a number... but of course the number has to be unique and populated into every record or the dups won't show.

                             

                            If that number field was calculated from 2 fields... one as an auto-entered decimal serial and the other which auto-enters say "10" in it... which for the favourites you change it to a "1"... then when it is sorted it would look like this:

                            1.0023

                            1.0059

                            1.0070

                            10.0001

                            10.0002

                            10.0003 etc

                             

                            ... then it does work... just ugly.

                             

                            See attached...

                             

                             

                            - Lyndsay

                             

                            Message was edited by: Lyndsay Howarth