I am retrieving the DerQtyAvailable value from an IDO on a form. When I get this value, it shows 6 places after the decimal. I want to only show 2 but since it is a string value, I cannot figure out how to either convert it to a decimal or format the string. This is my code. Any help is appreciated.
Sub GetQtyAvail()
Dim QtyAvailRequestData As LoadCollectionRequestData = New LoadCollectionRequestData()
Dim itemNum As String = ThisForm.Variables("ItemVar").Value
QtyAvailRequestData.IDOName = "ICSLItemLocs"
QtyAvailRequestData.PropertyList.SetProperties("Item, Whse, Loc, DerQtyAvailable")
QtyAvailRequestData.Filter = "Item = '" + itemNum + "' AND Whse='MAIN' AND Loc='W3'"
QtyAvailRequestData.RecordCap = -1
QtyAvailRequestData.OrderBy = "Item"
Dim QtyAvailResponseData As LoadCollectionResponseData = New LoadCollectionResponseData()
QtyAvailResponseData = Me.IDOClient.LoadCollection(QtyAvailRequestData)
Dim sItemType As String = String.Empty
If (QtyAvailResponseData.Items.Count <> 0) Then
sItemType = (QtyAvailResponseData(0, "DerQtyAvailable").ToString)
ThisForm.Components("W3QtyEdit").Value = sItemType
End If