Topic Options
Rate This Topic
#135602 - 10/13/06 11:37 AM Remedy API + VB.Net : value of field label
cmendes Offline
Just Signed Up

Registered: 12/20/05
Posts: 3
Can anybody help me?
Im using vb.net with api for remedy 6.3 and i want to know how to get access to the label of each field in a given form.

Until the moment i can access and store in a sql 2005 database the databasename and id for each field of a form that i choose.

I use the GetFieldNames method from Server class. Is there other
method to store the label value of the fields?

My code is like this:

###############

Try

RM.Login(server, user, pass, "")

Catch a As ARSystem.Exception

MessageBox.Show(a.Message)

End Try


Dim listform As System.Collections.ArrayList
listform = RM.GetListSchema

ComboBox1.DataSource = listform


list = RM.GetFieldNames("MESP:zImport")

With DataGrid1
.DataSource = list
End With


Dim x As FieldName
Dim z As Field



SqlDataAdapter2.FillSchema(DataSet11, SchemaType.Source, "Description")
SqlDataAdapter2.Fill(DataSet11, "Description")


Dim tbldescription As DataTable
dt = DataSet11.Tables("Description")

For Each x In list

Dim dr As DataRow
dr = dt.NewRow()
dr(0) = x.Name
dr(1) = x.FieldId

dt.Rows.Add(dr)

Next

SqlDataAdapter1 = New SqlDataAdapter

SqlDataAdapter2.Update(DataSet11.Tables("Description"))




###############

Thanks

Top
#135664 - 10/25/06 04:17 AM Re: Remedy API + VB.Net : value of field label [Re: cmendes]
cmendes Offline
Just Signed Up

Registered: 12/20/05
Posts: 3
Hello,
I have resolved my issue with the BMC.ARSystem.Utilities.FieldName(and i changed my code to C#)

My Code:

###################################################
foreach(BMC.ARSystem.Utilities.FieldLabel x in list)
{
dr = dt.NewRow();
dr["Old"] = x.Label;
... //more code
}
####################################################

Thanks Anyway,
CMendes

Top