The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.

Forum Discussion

egoodwin's avatar
egoodwin
New Contributor II
2 years ago
Solved

Passing OS Version Number as a Dashboard Parameter

I'm trying to create a Dashboard parameter that has the OS Version number of the application. I would have thought that something like

Dim osVersion As String = OneStream.Shared.Common.GeneralStrings.OSVersion

would return the value, but this simply returns the string "OS Version". Can someone please point me to the correct function or member to get the application version number?

  • This should work:

     

    dim version as String = Onestream.Shared.Common.XFVersionInfo.XFVersion

     

     

    From the XFVersionInfo you can get a couple of other related version-information:

     

     

6 Replies

  • This should work:

     

    dim version as String = Onestream.Shared.Common.XFVersionInfo.XFVersion

     

     

    From the XFVersionInfo you can get a couple of other related version-information:

     

     

    • egoodwin's avatar
      egoodwin
      New Contributor II

      This is exactly what I needed. Thank you.

  • DanielWillis's avatar
    DanielWillis
    Valued Contributor

    Not sure what you're doing exactly and it isn't what you asked but just thought I'd share as I can't see it documented anywhere. There are some https://learn.microsoft.com/en-us/cpp/preprocessor/preprocessor-directives?view=msvc-170 for 8.0 you can use if you want to make it easier to manage/compile version specific code:

    • ONESTREAM8_0_0
    • ONESTREAM8_0_0_OR_GREATER
     

     

    #If ONESTREAM8_0_0_OR_GREATER Then
     ' do exciting new stuff
    #Else
     ' do boring old stuff
    #End If

     

     

    • FrankDK's avatar
      FrankDK
      Contributor

      Interesting. Where did you pick that up, and do you have other hidden gems that could be useful?

      And btw, good coder humor with " ' do boring old stuff" 😁

      • DanielWillis's avatar
        DanielWillis
        Valued Contributor

        FrankDK wrote:

        Interesting. Where did you pick that up, and do you have other hidden gems that could be useful?


        I had to fly 20 hours from Sydney to Orlando for Wave to find out 😅

        I actually didn't realise it was a 'hidden gem'. I was going to link to the documentation and when I went to find it there was nothing I could find! Its definitely frustrating finding out there is something you should/could have been using but just needed to get lucky and have someone who knows share the knowledge.