none
What happened to the "equals generated value" action in business rules? RRS feed

  • Question

  • I've used the bulldog product for quite some time, and "equals generated value" was one of the choices, but it's not there now.  I want to have MDS generate the Member Code for data that I'm pushing into the staging tables with SSIS.  The issue is that the MemberCode column in the staging tables does not allow a null, so I have to put something there, which means "defaults to a generated value" won't work.  In bulldog, I could just generate on the fly something unique to put into the MemberCode column even though I didn't want that value as the code.  Then the "equals generated value" rule took over and generated the code I wanted.  How do I do this now?  Thanks!

    Wednesday, October 6, 2010 8:42 PM

Answers

  • What Xavier proposes will work on SQL Server MDS 2008 R2 but, unless I am mistaken (please correct me if this is incorrect), it will not work on SQL Server 2012 MDS. SQL Server 2012 MDS does no longer allow business rules that generate a code which is going a step backwards I think.

    Kind regards,

    Modesto

    Hi M

    Yes I confirm that what I propose was on SQL 2008 R2


    Regards,


    Xavier Averbouch
    Microsoft Community Contributor
    SOAT
    If a post answers your question, please click "Mark As Answer" on that post and "Vote as Helpful".

    Tuesday, April 30, 2013 10:28 PM
    Moderator

All replies

  • Hello Tallison

     

    1) create a business rule with "code defaults to generated value":

    2) insert your members with a '' for the code (empty string):

     

    INSERT INTO mdm.tblStgMember (ModelName, HierarchyName, EntityName, MemberType_ID, MemberName, MemberCode) VALUES

    (N'Testmodel', NULL, N'Testmodel', 1, N'essai4', N''),   

    (N'Testmodel', NULL, N'Testmodel', 1, N'essai5', N''), 

    (N'Testmodel', NULL, N'Testmodel', 1, N'essai6', N'') 

     

     

    note:

    if you try to insert a non empty code with this business rule activated (don't forget to activate it!), you will get this kind of error when processing staging batch : ERR210036 - Error - Because a code generation business rule exists, the MemberCode is not required

     

    note 2:

    when this kind of business rule is activated, you cannot edit the code in the web editor:

    Image Hosted by ImageShack.us

     

    Regards,

     


    Xavier Averbouch
    Thursday, October 7, 2010 12:02 PM
    Moderator
  • Does the same behavior happen in the Excel client?  Will the code not be visible in the Excel worksheet?  I want my codes auto generated and I don't want users to think they can enter this value from Excel. 

    Chad Dotzenrod SWC | TECHNOLOGY PARTNERS 1420 Kensington Road, Suite 110 Oak Brook, Illinois 60523-2144 http://www.swc.com

    Thursday, April 25, 2013 12:40 PM
  • What Xavier proposes will work on SQL Server MDS 2008 R2 but, unless I am mistaken (please correct me if this is incorrect), it will not work on SQL Server 2012 MDS. SQL Server 2012 MDS does no longer allow business rules that generate a code which is going a step backwards I think.

    Kind regards,

    Modesto

    Friday, April 26, 2013 7:41 AM
  • That is confirmed.  The ability to create business rules that generate codes in MDS 2012 does not work and is actually prevented when you try to do it.

    Chad Dotzenrod SWC | TECHNOLOGY PARTNERS 1420 Kensington Road, Suite 110 Oak Brook, Illinois 60523-2144 http://www.swc.com

    Tuesday, April 30, 2013 6:12 PM
  • What Xavier proposes will work on SQL Server MDS 2008 R2 but, unless I am mistaken (please correct me if this is incorrect), it will not work on SQL Server 2012 MDS. SQL Server 2012 MDS does no longer allow business rules that generate a code which is going a step backwards I think.

    Kind regards,

    Modesto

    Hi M

    Yes I confirm that what I propose was on SQL 2008 R2


    Regards,


    Xavier Averbouch
    Microsoft Community Contributor
    SOAT
    If a post answers your question, please click "Mark As Answer" on that post and "Vote as Helpful".

    Tuesday, April 30, 2013 10:28 PM
    Moderator