3 Replies Latest reply on Jan 10, 2017 7:17 AM by igreguri

    Merge attributes to string

    igreguri

      Hi,

      I have some calcullation for time to filling/emptying storage tanks.

      In equation H is hours, and M is minutes.

      Is it possible to merge this for result in format like H:M (ex. 39:02)?

      merge.jpg

      My AF server is older version (v2.5.0.5039) without Analyses.

      Regards,

      Igor

        • Re: Merge attributes to string
          Rick Davin

          Hi Igor,

           

          Since the post title says "string", the direct answer is you cannot use the Formula data reference to produce a good string.  You can use the Formula DR to produce an error string but you really don't want that.

           

          The options are (a) upgrade your AF version in order to use Asset Analytics or (b) create a custom data reference.  Personally, I would go with (a) as my first and only choice. 

          This could be an On Demand analysis.  Your output could be a string or even a TimeSpan object, in which case the AFAttribute should have a type of Anything.  You would have little formatting control over the TimeSpan, so the displayed value would appear as 39:02:00 for example.

           

          Good luck,

          Rick

          • Re: Merge attributes to string
            Roger Palmen

            Hmm, AF 2.5. That's AF 2012. Limited options as Rick already mentioned. Was thinking about mutliple formulas and string concat. But that is not available in your version.

             

            I would say, either upgrade or implement a custom DR. Or get creative using Performance Equations.