BO Mapper Bug on FieldChanging event when allow null


Author
Message
Larry Caylor
Larry Caylor
StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
I've come across a bug in BO Mapper when adding a FieldChanging event to a field that allows nulls. 
The following code was generated by the mapper. The "If value..." comparison always results to false,
since the value was set equal to the e.FieldValue in the prior line, resulting in the item always
being set to DBNull.
Set(ByVal value As System.Int32)
   Dim e As New TestBOFieldChangingEventArgs(TestBOFieldNames.ta_tst_idvalue)
   Me.OnFieldPropertyChanging(Mee)
   value = CType(e.FieldValue, System.Int32)
   If value <> CType(e.FieldValue, System.Int32Then <---- Always False
        Me.CurrentRow.Item("ta_tst_id") = value
   Else
       Me.CurrentRow.Item("ta_tst_id") = DBNull.Value
   End IfEnd Set
Since I've configured the item to be Return Alternate on Null / Set Null on Alternate to 0 
I believe the if statement should be "If value <> 0 Then" as it does when adding a FieldChanged event.
The following code was generated by the mapper for a field where Alternate on null was set to 0 with
both FieldChanged and FieldChanging events. The FieldChanged event code uses "If value <> 0" while the
FieldChanging event code is using "If value <> Ctyp..."
Set(ByVal value As System.Int32)
   Dim e As New TestBOFieldChangingEventArgs(TestBOFieldNames.ta_tst_idvalue)
   Dim llRaiseEvent As Boolean = False
   Dim loRow As DataRow = Me.CurrentRow
   Me.OnFieldPropertyChanging(Mee)
       value = CType(e.FieldValue, System.Int32)
       If value <> 0 Then
           If Not loRow.Item("ta_tst_id").Equals(valueThen llRaiseEvent = True
       Else
           If Not loRow.Item("ta_tst_id").Equals(DBNull.ValueThen llRaiseEvent = True
       End If
       If value <> CType(e.FieldValue, System.Int32Then
           loRow.Item("ta_tst_id") = value
       Else
          loRow.Item("ta_tst_id") = DBNull.Value
       End If
       If llRaiseEvent Then Me.OnFieldPropertyChanged(MeNew TestBOFieldChangedEventArgs(TestBOFieldNames.ta_tst_id))
End Set




StrataFrame Team
S
StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Hrm.  Good catch, Larry.  I'll get that fixed for you.
Edhy Rijo
E
StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)StrataFrame VIP (5.6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Ben,

Ben Chase (9/6/2016)
Hrm.  Good catch, Larry.  I'll get that fixed for you.

And for me too! Please Smile

Thanks Larry!!

Edhy Rijo

Edited 8 Years Ago by Edhy Rijo
Keith Chisarik
Keith Chisarik
StrataFrame VIP (2.2K reputation)StrataFrame VIP (2.2K reputation)StrataFrame VIP (2.2K reputation)StrataFrame VIP (2.2K reputation)StrataFrame VIP (2.2K reputation)StrataFrame VIP (2.2K reputation)StrataFrame VIP (2.2K reputation)StrataFrame VIP (2.2K reputation)StrataFrame VIP (2.2K reputation)
Group: StrataFrame Users
Posts: 939, Visits: 40K
Good to see a developer post. Hi Ben.

Keith Chisarik
Larry Caylor
Larry Caylor
StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
Ben,

How are you doing on that fix?

-Larry
Larry Caylor
Larry Caylor
StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
Any estimate on when a fix will be available for this? It's a pain to have to work around it with custom code.

-Larry
Larry Caylor
Larry Caylor
StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
PING!  I'd really like to have a fix for this as it is causing problems for me.

-Larry
Larry Caylor
Larry Caylor
StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
Is anyone from MicroFour monitoring the support forum??? It's been two months and this issue still exists. I wouldn't think it is that difficult of a fix to make.

-Larry
Larry Caylor
Larry Caylor
StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)StrataFrame VIP (1.7K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
Any chance this will get fixed?  It's a pain to have to maintain custom code as a work around.

-Larry
StrataFrame Team
S
StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)StrataFrame Developer (6.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Howdy Larry,

I got this fixed.  I am currently unable to do a full build because our build server is in a state of flux, but I have updated the posted release with the VISX to include this fix.  The change was made to the AddIns DLL, so that should be the only one you need to swap out.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search