2 Replies Latest reply on Oct 27, 2012 11:27 AM by RickWhitelaw

    Merge Variables in List view

    RickWhitelaw

      Title

      Merge Variables in List view

      Post

           I have a layout that prints cheques. For the amount I use a merge variable. As in Let $CH=Fee + HST - work dues. This works fine. The number to text function works as well with $CH as input. All fine. Today I decided to make a cheque register layout. This is viewed in List view. Of course dozens of records are visible at the same time. Well, merge variables simply don't work on this layout. I'm using the "old" metod. The "I declare variables" conditional formatting because I prefer it to writing On Layout Enter triggered scripts for each layout to declare the variables. I think the issue has to do with FM not refreshing the variables on a record to record level. Merge variables are loaded when the layout loads and I suppose multiple occurrences in list view will not refresh properly. On either layout in Form View the results are what I expect. In list view The numbers actually will be out of sync. Record # 1 will display the value of record 2 etc.  ideas? Observations?

        • 1. Re: Merge Variables in List view
          LaRetta_1

               "I think the issue has to do with FM not refreshing the variables on a record to record level."

               Refresh can be an issue but shouldn't be even in list view.  Version 11 works without script or triggers at all (except single 'I declare' and merge variable field) and in 12.0v2 (on windows) it only requires a trigger OnRecordLoad with simple Freeze Window.  I haven't tested on Mac nor have I tested 12.0v3 yet.  YMMV.

               The secret is to place the 'I declare variables' UNDER the merge variable which forces it to refresh on every row.  Attached is an example.  And sometimes in very complex situations it requires a bit more such as Refresh Window or simply isn't worth it.  But most times it is. 

               Example files in both version 11 and 12:  

          http://www.directlinesolutions.com/downloads/List_MergeVar.zip

                

                

                

          • 2. Re: Merge Variables in List view
            RickWhitelaw

                 Thanks!

                 i had the "I declare"  in the header which works fine in form view. Of course it should be in the body. I'm on iPad at the moment so couldn't open the example.

                 rick.