Loading

CChong2 (Flexera) asked a question.

Session.FormatRecord and VBScript
Hello!

 

I'm a bit confused about the use of Session.FormatRecord. It seems to me that it is not well documented. I tried to use it to retrieve some properties, bu it doesn't seem to wrok. :(

 

It this the correct way to use it?

 

set rcd = Installer.createrecord(3)

 

rcd.stringdata(0) = "[1] ... [2]"

 

rcd.stringdata(1) = "[filename.ext]"

 

rcd.stringdata(2) = "[ProductName]"

 

session.FormatRecord(rcd)

 

msgbox rcd.stringdata(0)

 

Any ideas? Any link? Any documentation?

 

Thanks.

  • Community Manager (Flexera Software)

    You're right, it doesn't seem to be documented very well; I think the return value of FormatRecord is the formatted string. Something like this, perhaps (sorry, this is from memory):

     

    [code]Set oRec = Installer.CreateRecord(2) ' field zero isn't included

     

    oRec.StringData(0) = "Hello, [1] on [2]!"

     

    oRec.StringData(1) = "[LogonUser]"

     

    oRec.StringData(2) = "[ComputerName]"

     

    strFormattedText = Session.FormatRecord(oRec)

     

    MsgBox strFormattedText[/code]
    Expand Post
  • Don't you love the way it says

     

    " The FormatRecord method of the Session object returns a formatted string from a template and record data. "

     

    followed by

     

    " This method has no return values. "
    Expand Post

Related  Product Forums


                     → Flexera One



                      → Snow Atlas



                      → FlexNet Manager



                      → Snow License Manager



                       → App Broker


       Need help finding an answer?


        Ask a Question →


Loading
Session.FormatRecord and VBScript