Query for user input items?
Best Answers
-
Roland_Kind Partner Advanced IT Monkey ✭✭✭
Hi,
depending on your needs:
the info ist part of the viewmodell (in the Portal) : pageForm.viewModel.UserInput
or in PS Object (get-scsmclassinstance) .UserInput Property (XML formatted)
or in SCSM (ServiceManager DB View) MTV_System$WorkItem$ServiceRequest.[UserInput_75DF0BE8_3446_F616_6AC0_8510B74838AF] field
hope this helps
5 -
Justin_Workman Cireson Support Super IT Monkey ✭✭✭✭✭If you're looking to write a report, I think @Roland_Kind is on the right track with providing the UserInput field from the ServiceRequest table in the ServiceManager database. You'll still have to figure out how to parse the xml in that field though. If it were me, I'd probably use powershell to pull the desired work items and parse the userinput that way. This is a quick start:$srClass = Get-SCSMClass -name system.workitem.servicerequest$$requests = Get-SCSMObject -Class $srClass -Filter "userinput -like *"$htmlOutput = "<html><body>"foreach ($r in $requests) {$htmlOutput += ("<h1><strong>" + $r.displayName + "</strong></h1>")[xml]$UserInput = $r.UserInput$htmlOutput += $UserInput.UserInputs.UserInput | select Question,Answer | ConvertTo-Html -Fragment}$htmlOutput | Out-File $env:USERPROFILE\Desktop\UserInput.html
Note that this will put an html "report" on your desktop. With a little bit of HTML styling, this could look quite nice for your needs.
Hope it helps.5
Answers
Are you just looking for a way to parse the UserInput property of the resulting SRs from ROs?
These are the questions in the Request Offering, for a change to the firewall. previously this was managed with a spread sheet. I need a query to pull this info for a historical report. not sure where to find the user input data.
Hi,
depending on your needs:
the info ist part of the viewmodell (in the Portal) : pageForm.viewModel.UserInput
or in PS Object (get-scsmclassinstance) .UserInput Property (XML formatted)
or in SCSM (ServiceManager DB View) MTV_System$WorkItem$ServiceRequest.[UserInput_75DF0BE8_3446_F616_6AC0_8510B74838AF] field
hope this helps
Note that this will put an html "report" on your desktop. With a little bit of HTML styling, this could look quite nice for your needs.
Hope it helps.