4 Replies Latest reply on Jul 21, 2013 8:08 AM by philmodjunk

    Calculation field in Portal

    obidon

      Title

      Calculation field in Portal

      Post

           Evening

           I have a simple portal which contains a list of text fields.  On entering data, I want to auto insert an item number which is generated by the highest value in the list.  

           I have created a caluclation in the parent record.  Next Sort Number = Max ( Appendix C Agreed Limitations::Sort ) + 1

           This is not being recognised when enetering the next portal row.  Please can you advise

        • 1. Re: Calculation field in Portal
          philmodjunk

               Try clearing the "do not replace existing value" check box and see if it now works.

          • 2. Re: Calculation field in Portal
            obidon

                 It didnt work Phil

                 The portal contains 2 fields.  The Sort Number and Appendix Item.  The Appendix Item is a popup list.

                 I think it has something to do with the parent record not being refreshed prior to the next portal records being created and consequently the autoentry calc being wrong

            • 3. Re: Calculation field in Portal
              obidon

                   Phil

                   I have hammered a solution through by creating an overkill solution.

                   Script:

                     
              •           refresh, flush cached join result, flush cached external data
              •      
              •           commit

                   This is applied to my data entry popup menu as script trigger.  I've applied it to all options, from OnObjectEnter through to OnObjectExit. This now works but I don't understand the logic.

                   Please can you assist please?

              • 4. Re: Calculation field in Portal
                philmodjunk

                     Refresh Window with the "flush" option specified fully refreshes all data refrences in the layout's current record. That can lead to significant delays in getting the layout to update in some situations and thus is an option best avoided.

                     A commit records step after adding eachy new portal record may be all that you need to get the field to update. You can test this manually by clicking the layout back ground after each new portal record as this forces a commit records.

                     And if you are using a script to force the update, you could also set up a number field in the parent record and just use Set FIeld to update it with the next value in the series each time you are now using Refresh/flush to update the value.