Update data in reports

Follow

Comments

2 comments

  • Tue Lunde Schultz

    I want to edit some reports, while maintaining the possibility to review them with the originals.

    Can I modify the above script, to instead of a re-upload, upload it as a new report - new UUID, serial number etc?

    Specifically I want to do some side by side comparison of data structures, and how they impact the Unit Flow.

    I want to maintain the test station in the reports, so I can't upload with the WATS client.

    0
    Comment actions Permalink
  • Anders Kristiansen

    Hi Tue,

    Creating a "duplicate" report will require changing the report id and at least one of serial number, part number, start date/time, or process.

    That would be these modifications:

    $wrml.Reports.Report.ID = New-Guid

    #One of these
    $wrml.Reports.Report.SN="Test"
    $wrml.Reports.Report.PN="Test"
    $wrml.Reports.Report.Start = Get-Date -Format "yyyy-MM-ddTHH:mm:ss.fffffffzzz"
    $wrml.Reports.Report.Process.Code="10"
    $wrml.Reports.Report.Process.Name=$null #Remove process name when changing process code
    if ($wrml.Reports.Report.Process.HasAttribute("Guid")) { $wrml.Reports.Report.Process.Guid=$null } #Remove process guid if it exists when changing process code
    1
    Comment actions Permalink

Please sign in to leave a comment.