I created this subroutine for a list box on my application and it works well but I have other list controls that require the same function. How do I go about creating a argument for the object (path) so all I need to pass into the sub is the object path?
Public Sub Set_Value_TaxTypeId()
Dim strTag As String
Dim strTxt As String
Dim intItemCount As Integer
intItemCount = repo.EDITSOLUTIONSClient.TaxTypeId.Options.Count
For intCount As Integer = 0 To intItemCount
strTxt = repo.EDITSOLUTIONSClient.TaxTypeId.Options.Item(intCount).InnerText
If strTxt = "Social Security Number" Then
strTag = repo.EDITSOLUTIONSClient.TaxTypeId.Options.Item(intCount).Value
repo.EDITSOLUTIONSClient.TaxTypeId.Element.SetAttributeValue("TagValue", strTag)
End If
Next
End Sub
Global Sub for All Lists
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Global Sub for All Lists
Hi,
You could get the RxPath using the following method of the Adapter "GetPath(PathBuildMode)" or via the "AbsolutePath" property of the RepoItemInfo.
I used the windows calculator for the small sample:
Regards,
Markus
You could get the RxPath using the following method of the Adapter "GetPath(PathBuildMode)" or via the "AbsolutePath" property of the RepoItemInfo.
I used the windows calculator for the small sample:
Dim myPath As RxPath = repo.Calculator.ContainerHash32770.Button121.GetPath(PathBuildMode.Reduce) Report.Info(myPath.ToString) ''' OR myPath = repo.Calculator.ContainerHash32770.Button121Info.AbsolutePath Report.Info(myPath.ToString)The variable myPath could then be passed to your method.
Regards,
Markus
Re: Global Sub for All Lists
Thanks, that helped!