Forum Discussion

BillHandelman's avatar
BillHandelman
New Contributor II
7 months ago

BR SaveMemberInfo is changing Text3 field in all Flow members inadvertently

I use the Text3 field in Flow members to hold a status value. I have a BR that is creating one Flow member at a time. When the BR runs the line with SaveMemberInfo, every one of my flow member's Text3 values are changed to values that are incorrect. Does anyone have any thoughts on why this is happening. Following is the code I am using to save the Flow member:
****************************************************************************************************
strModName = "This is the Flow member name"
strCurrPdoDescr = "This is the Flow member description"
Dim objDim As OneStream.Shared.Wcf.Dim = BRApi.Finance.Dim.GetDim(si, "std_Flow")
Dim intModId As Integer = BRApi.Finance.Members.GetMemberId(si, dimtypeid.Flow, strModName)
Dim objMemberPk As New MemberPk(DimType.Flow.Id, intModId)
Dim objMember As New Member(objMemberPk, strModName, strCurrPdoDescr, objDim.DimPk.DimId)
Dim objProperties As New VaryingMemberProperties(DimType.Flow.Id, objMember.MemberId, DimConstants.Unknown)
Dim NewFlowMbrProperties As FlowVMProperties = objProperties.GetFlowProperties()
NewFlowMbrProperties.Text1.SetStoredValue(DimConstants.Unknown,DimConstants.Unknown,"")
Dim objMemberInfo As New MemberInfo(objMember, objProperties, Nothing, objDim, DimConstants.Unknown)
Dim isNew As TriStateBool = TriStateBool.TrueValue
BRApi.Finance.MemberAdmin.SaveMemberInfo(si, objMemberInfo, True, True, False, isNew)

  • Henning's avatar
    Henning
    Valued Contributor II

    Hi Bill,

    I took your code and executed it locally in my flow dimension. It creates the member as expected and did not change any of my test text fields in Text 3 on any of the other members. I tested this with Text 1 as well, nothing changed.

    Also, you are defining Text 1 in the code, but it affects Text 3 of the other members? How do the text properties get changed? Randomly? Or is any pattern observable? 

    However, more importantly, does this issue also occur when you run this rule as an Extender without anything else around it, such as this? 

     

    My guess is that something else in your code / process may cause this, and with the above test you should be able to confirm this.

    • BillHandelman's avatar
      BillHandelman
      New Contributor II

      Thank you for trying to help with this. I forgot to mention that the values in Text3 are in "Long Term"/2027 in the Flow members. I have tested this by running the code one line at a time starting at the beginning. What I mean is that the first test was to run only line 1 and then check the Text3 values, The second test was to run line 1 and 2 and check the Text3 values. The third test was to run line 1 to line 3 and then check the Text3 values. I continued testing until I ran all lines.  The Text3 values are fine for every test except when I run all the lines. Because I tested this way, I feel that it is the last line that is causing the issue. This happens even when I comment out the line that is setting Text1.  I don't think the Text3 values are being set to random values. There is a pattern but I'm not sure where these values are coming from.  I'll test as you suggested in your screenshot and update this ticket with the results.

  • BillHandelman's avatar
    BillHandelman
    New Contributor II

    My team and I figured out the issue. It was a version 7.1.1 issue. We have been developing our solution in 7.1.1 and are working on migrating to 7.2.4 but have not gotten there yet. Hopefully soon.