V9 SR2 Select a row in read-only grid with null date

Options

I have a readonly grid with several columns.  Two columns are DateTime type.  When the user selects a row I set a local variable using ProcessContext.UserInput[1].  When either of the date fields are null it doesnt set the local variable.  If both dates are not null it sets the local variable as expected.  Has anyone seen this? 

Tagged:

Comments

  • I am getting the same problem with SR3, but I also get a run time error and none of the fields from the grid go into the business object variables.

     

    Have you been able to do anything with this? Did you create an issue with support?

  • I had something similar to this....except I would get errors with text, number field or both.

    In  order to bypass the run time error I had to put everything in a try-catch on row select:
    Example:

    try { Local.txtTempField1 = ProcessContext.UserInput[0]; } catch (Exception e) {}
    try { Local.txtTempField2 = ProcessContext.UserInput[1]; } catch (Exception e) {}

     

    Hope that helps.

  • It works fine for a null text field, but not for a null date :mansad:

     

    try { NullDateProcData1.MyDate = ProcessContext.UserInput[0]; } catch (Exception e) {}
    try { NullDateProcData1.MyText = ProcessContext.UserInput[1]; } catch (Exception e) {}
    try { NullDateProcData1.MyInt = ProcessContext.UserInput[2]; } catch (Exception e) {}

  • Interesting, I have this working for my null dates.

     

    Only difference I can tell is that I'm update the Local business object while you are updating a custom one.

     

    If you can attach your solution file, I'll be more then happy to run through it.

  • Many thanks!!!!

     

    The external table is 3 columns, one date, one text, one int.

  • It works when I take the date column out of the grid. For my current requirement, that is fine.

     

    But with the date in the grid, it doesn't work even if the date is not even assigned to a process BO field!!!

  • Your solution worked for me after creating the NullDateData table.

     

    Table settings:

     

    1.  Text = nvarchar[50]

    2.  NullDate = datetime

    3.  Number = int

     

    I also added an ID column and set it as the Primary Key and enable Identity Column on it.

     

     

     

     

  • With the date column in the grid?

     

    What SR are you using?

  • Yes with the date column in the grid and populating the date object on row select.

     

    SR 9.0.2.1556

  • It's working for me now as well except that I had to take the date column out of the grid. I am on SR3, but I have another instance on SR1, so I will try it there as well.

     

    Many thanks!!!

  •  


    RKushner wrote:

    It's working for me now as well except that I had to take the date column out of the grid. I am on SR3, but I have another instance on SR1, so I will try it there as well.

     

    Many thanks!!!


     

    I'm not sure I understand. You have a problem that seems only to appear when there is a date column in teh grid. I agree, I have seen this, pretty sure I reported it, and I can reproduce your issue.

     

    How can removing the date column be a 'fix' in any way? Surely the problem only occurs when you have the date field. Maybe I misunderstood your last post, however.

     

    AFAIK this was introduced in SR3, BTW.

  • What database are you using?  I'm having the problem on a project that is using Oracle 10g.  On another project using SQL Server we do not see the problem.  My quick fix was just to make a query BO and change the date to formatted text.  I include the date fields in the BO but don't include them in the table.  That way you can still use ProcessContext.UserInput without any problems.  It's not the ideal solution but works for now. 

  • The requirement that I have is not to display the date field in the grid, but rather simply to copy the date field from the BO which is behind the grid into the process BO. That works using the c# try...exception code, iff I do not have the date field in the grid, but it doesn't work if the datefield is in the grid. In fact, I can't even copy other fields from the grid BO into the proc BO, even when I don't try to copy the date field, if the date field is included in the grid and contains a null.

     

    The database I'm using is sql server. And yes, it does sound like a good idea to turn the date into text, but now I don't need to. On the other hand, I would still need to turn the date/text back into a date for further processing in MetaStorm.

     

    Thanx!!!

  • OK, I see.

     

    So if you remove the date field form the grid, it is OK. If you n't need the date field in the grid, then that would work, yes.

  • I had the exact same issue yesterday. Being new to Metastorm, it took me a while to figure it out. I'm using V9.0.3.3. Is there any work being done to resolve this "grid issue"?

  • Metastorm SR ref # SR-04212011-0021

     

    Hi, this issue has high visibility within R&D and we are working to address the issue in a future release. The issue will not however be resolved in the upcoming 9.1 release and is most likely to be fixed in the following service release - 9.1.1.

     

    Regards.