Hi
Good to hear that your issue is resolved.
Any way, I like to add a note I wrote to some one else previously with
regards to GetListFilter overloads -- this issue kind of applies to your
usage (Login method in your case) and several other methods in AR .NET
API that have overloaded methods. So this information may be useful in
your future work:
>>>>>
There are quite a few overloads for the GetListFilter method - no args
(gets all filters), one form name arg (gets filters of a form), one
DateTime arg (gets filters modified/created after certain time), two
args (form name followed by DateTime - that allows for getting filters
of a form that are created/modified after certain time). These
overloaded methods are nicely accessible from within .NET environment
(like in VB.NET or C# programs), however in COM clients they are
accessible with some what of a cryptic names - functionName with an
optional "_Number" suffix. For example GetListFilter overloads are named
GetListFilter, GetListFilter_2, GetListFilter_3, GetListFilter_4 etc. I
believe your usage one (that accepts a single string param) is
GetListFilter_2. So, the following snippet works better:
Dim arserver
Dim filter
Dim filters
Set arserver = CreateObject("BMC.ARSystem.Server")
arserver.Login "localhost", "Demo", ""
'set filters = arserver.GetListFilter()
'Comment out the above line and
'Uncomment the following:
arserver.GetListFilter_2 ("HPD:Help Desk")
For Each filter In Filters
wscript.echo filter
set obj= arserver.GetFilter(filter)
if (obj.Enabled) then
wscript.echo Filter
wscript.echo obj.RunIfQualification
wscript.echo obj.LastModifiedBy
wscript.echo obj.LastUpdateTime
end if
next
To view such mangled function name details, open up the "OLE/COM Object
Browser" and look up the type information of BMC.ARSystem.tlb and
specifically within coclass Server. On a side note, for doing some heavy
duty tools, I would encourage using .NET clients (VB.NET or C# etc) as
opposed to COM clients (like VBScript code) as the former allow for more
type safe coding specifically with regards to the AR System .NET API.
<<<<<
Regards
Appajee
> -----Original Message-----
> From: Action Request System discussion list(ARSList)
> [mailto:[EMAIL PROTECTED] On Behalf Of cevans
> Sent: Saturday, January 13, 2007 6:24 PM
> To: [email protected]
> Subject: Re: Using VB Script to Add an Attachment in Remedy
>
> Thanks for everyones help. I was able to get this to work using the
> example
> provided on the website which I had looked at before but could not get
> past
> a logon problem. long story short using:
>
> server.Login "localhost", "Demo", "password"
>
> Instead of:
>
> server.Login "localhost", "Demo", "password", ""
>
> Got me past my issue and the example then helped me the rest of the
way.
>
> Thanks!!!
>
_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org ARSlist:"Where the
Answers Are"