10 Replies Latest reply on Jan 9, 2014 1:16 PM by flybynight

    Wanted: Global Variable Field

    nickchapin

      It's time for another new feature in 14, a global variable field.

       

      This would be a global variable as we have now, but it would act like a field on a layout. Users could enter data into the global variable field as they would any field but instead of data in a table it's just a global variable. Imagine that we wouldn't need to create one or more global fields in the schema for:

      • ui value list pickers
      • temp data from a dialog box
      • any element now where we need to capture temporary user input.

       

      Now if we can get the engineers to make it so!

        • 1. Re: Wanted: Global Variable Field
          hbrendel

          Using a global field for this purpose works perfectly well

          • 2. Re: Wanted: Global Variable Field
            nickchapin

            Yes, but that's additional schema required just for ui functionality - something that should be avoided, imho.

            • 3. Re: Wanted: Global Variable Field
              Mike_Mitchell

              Seems you could use a single global field, capture the input, stuff it into a variable, and then clear the field. Doesn't seem like too much schema overhead.

               

              But that's me.

               

              Mike

              • 4. Re: Wanted: Global Variable Field
                wimdecorte

                That's similar to what Access has with "unbound text boxes".  I think having these in FM would only be useful if we can also use their content to base relationships.

                • 5. Re: Wanted: Global Variable Field
                  nickchapin

                  I thought that as well but would think that's a greater coding challenge for the engineers than the original thought.

                  • 6. Re: Wanted: Global Variable Field
                    flybynight

                    In a similar, but different vein…

                    I've also had many times where I would like to have a "Merge Calculation" on a layout. Something that would normally require a field added to the schema, but is only needed to display on certain layouts. Yes, you can use a $$variable with a layout enter trigger, but then that doesn't update unless you add other triggers. I think it could be useful.

                    Along with that, I'd love to have a more elegant way to limit the size of merge elements on a layout. So often, the field length (or calc length in my wish feature) are much larger than the space the result will take up. You can do the trick of shrinking all but the first character of the merge element, but that is a little hokey, IMO.

                     

                    Laters,

                    -Shawn

                    • 7. Re: Wanted: Global Variable Field
                      jbante

                      It's possible to do a "merge calculation" using a merge variable without a script trigger. You set the variable with a conditional formatting calculation using the Let function on a different object than the merge variable. The object setting the merge variable needs to be beneath the merge variable in the layout z-order.

                      • 8. Re: Wanted: Global Variable Field
                        beverly

                        +1 global variables for relationships would have to be the key here (pun!)

                         

                        Like those constants we can apply in SQL calls, we need something that could be revised as needed AND used as match fields. Mais oui!

                        • 9. Re: Wanted: Global Variable Field
                          wimdecorte

                          Beverly Voth wrote:

                           

                          +1 global variables for relationships would have to be the key here (pun!)

                           

                          Like those constants we can apply in SQL calls, we need something that could be revised as needed AND used as match fields. Mais oui!

                          Bien sur...

                          We can use SQL and generate that dynamically to get what we want in many cases, except for portals and other display elements... it'd be sweet if we could define a relationship on the graph by specifying a SQL query, seems that we could then use local / global variables in that query... and so on

                          • 10. Re: Wanted: Global Variable Field
                            flybynight

                            OK, so it's possible another way…

                            Still… a little janky, if you ask me. I would categorize something like this as a cool "trick," but not a solid "feature." Sure, you aren't using a trigger, but you are using a conditional formatting calc on a different object… sounds to me like this would get "lost" easier than a trigger. And the fact that it needs to lower in the z-order means there is easy potential to accidentally break it.

                            Don't get me wrong… I love that there are people like you to figure all this stuff out. But a more straightforward, full-on feature would be a lot easier to implement, not to mention to disect, should anyone inherit a solution that uses these tricks.

                            Laters,

                            -Shawn