Slight tweaks:

Set oTemp = oEnvironment.ListItem("TheList")
If not oTemp.Exists("NewItem") then
    oTemp.Add "NewItem",""
    oEnvironment.ListItem("TheList") = oTemp
End if

-MTN

From: [email protected] [mailto:[email protected]] On 
Behalf Of Miller, Todd
Sent: Wednesday, March 16, 2016 3:01 PM
To: [email protected]
Subject: [MDT-OSD] Append an item to MDT ListItem?

I should know this and I am drawing a blank.
In an MDT script, what is the process to add a value to an existing Itemlist?



Does the code below look correct?  Not sure about this line --- oTemp.Add = 
"New",""
What is that trailing "" for?


oTemp = oEnvironment.ListItem("TheList")
If not oTemp.Exists("NewItem") then
    oTemp.Add = "NewItem",""
    oEnvironment.ListItem("TheList") = oTemp
End if





________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the 
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and 
may be legally privileged.  If you are not the intended recipient, you are 
hereby notified that any retention, dissemination, distribution, or copying of 
this communication is strictly prohibited.  Please reply to the sender that you 
have received the message in error, then delete it.  Thank you.
________________________________

Reply via email to