Hi Terry,
Ok, if using a JOIN to get the field, then your code is OK. Basically what is happening is that when you are accessing the BO.PRCANUM, if those fields included in the JOIN are empty, then you will not get anything, this could happen when adding a new record and trying to show the BO.PRCANUM will be empty.
If you debug the code before showing the message box image, you will see the field is empty. Put a breakpoint in your property Get line and see what happen when showing the value in the message box.
On a side note, I try to distinguish my Custom Field Properties form regular BO properties by prefix them with "cfp_", also in my JOIN SELECT I name those fields with the prefix ex: SELECT membershipcd AS cfp_membershipcd or do the expression at the field level instead of the BO like SELECT (membershipcd + membershipnumber) AS cfp_PRCANUM, then in the BO CFP I use the required column as expected. I use a lot of CFPs and in some cases like when adding a new record, I need to show the value, so in the CFP GET I check for empty value and even do a search to show the correct value, here is a sample:
<Browsable(False), _
BusinessFieldDisplayInEditor(), _
Description("Card Name with the Card Code."), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
Public Overridable ReadOnly Property [cfp_CardName]() As String
' Check to see if datatable contains the custom field in
' case object was filled by a method that doesn't contain the field.
Get
Dim columnName As String = "cfp_CardName"
If Me.CurrentDataTable.Columns.Contains(columnName) Then
If Not TypeOf (Me.CurrentRow.Item(columnName)) Is DBNull Then
'-- In some cases the Me.CurrentRow.Item(columnName) could be empty so
' lets look at the value if there is a FK_Items value
Dim cfpCardName As String = CStr(Me.CurrentRow.Item(columnName))
If String.IsNullOrEmpty(cfpCardName) And Me.Count > 0 Then
Using bo As New bizItems
bo.FillByPrimaryKey(Me.FK_Items)
If bo.Count > 0 Then
cfpCardName = bo.ItemName
End If
End Using
End If
Return cfpCardName
Else
Return String.Empty
End If
Else
Return String.Empty
End If
End Get
End Property
Hope that will give you an idea to help you find the issue.
P.S.
Happy new year to you too!!!!
Edhy Rijo