Forum Stats

  • 3,814,623 Users
  • 2,258,892 Discussions
  • 7,892,787 Comments

Discussions

Unique Primary Node Description Validation?

MNW
MNW Member Posts: 118

We have a need in DRM version 11 1.2.4.302 for a validation that ensures all primary nodes have a unique description. The VersionUniqueProp validation function fails to suit our needs because our hierarchies have shared nodes with the same description that fail the validation. Also, VersionUnique2Prop doesn't work because it is a Global Node validation but Core.SharedFlag isn't a selectable property. I noticed there was a topic about this last year found here: but with no resolution. Has anyone implemented this validation successfully? Could you share how you achieved it?

Thanks!

Tagged:
DenzzScottQ

Best Answer

  • MNW
    MNW Member Posts: 118
    edited Oct 22, 2015 10:02AM Answer ✓

    Denzz, thanks for your help so far.

    I created a global property with the logic you specified and used the Evaluate function inside the property definition to evaluate a shared node and a primary node. It works as intended! But when I return to my hierarchy and check the property value on the nodes themselves, the functionality fails - Core.SharedFlag_MDM always returns false.

    So I tested with a local property, and in both the evaluate and hierarchy view, it works as intended.

    It appears the SharedFlag_MDM property always returns FALSE in global properties. We tested the same thing using the POS function and achieved the same results; POS always returns 0 in global properties, but returns the expected value in local properties.

    Sounds like SR material unless anyone else can elaborate on why this might be?



    edit: I figured out why this is the case. Global Property values must be the same across all nodes. So in the following instance, if I create a global property called "IsShared" and set its value to PropValue(Core.SharedFlag_MDM) the following will happen:

    Core.AbbrevCustom.IsShared
    AC_123FALSE
    AC_123:Shared001FALSE

    Because IsShared is Global, its value cannot be different across shared or linked nodes. But if we set IsShared to Local we will see our intended functionality:

    Core.AbbrevCustom.IsShared
    AC_123FALSE
    AC_123:Shared001TRUE

    So the issue with this now, is that the VersionUniqueProp and VersionUnique2Prop validations require global variables to function. And because the Core.SharedFlag_MDM property and POS function are incompatible with global properties, this functionality will not work for us.

«1

Answers

  • Denzz
    Denzz Member Posts: 813 Gold Badge
    edited Oct 6, 2015 8:25AM

    Try Creating a property

    Custom.Prop1-

    If(PropValue(Core.SharedFlag_MDM),

    PropValue(Core.Abbrev),

    PropValue(Core.Descr)

    )

    Use Prop1 in your VersionUniqueProp and see if that fulfills your need, Keep in mind these validations only run in Batch mode.

    Thanks

    Denzz

  • Murali Pasumarti
    Murali Pasumarti Member Posts: 498 Gold Badge
    edited Oct 6, 2015 9:37AM

    @Denzz, I thought the same but it will not work when we have more than one shared occurrence of a node, checking further, but you are right the out of the box VersionUnique Prop will not help if we have shared nodes.

  • Denzz
    Denzz Member Posts: 813 Gold Badge
    edited Oct 6, 2015 9:41AM

    @Murali Pasumarti

    Trying to understand- why do you think it would not work the name of the Shared node instances will always be Unique.

    We are just trying to Keep the shared nodes out of the check.

    Thanks

  • Murali Pasumarti
    Murali Pasumarti Member Posts: 498 Gold Badge
    edited Oct 6, 2015 9:54AM

    If for example we have node AC_123 and it's shared occurrences AC_123!Shared1 and AC_123!Shared2, the validation treat these 2 shared nodes as 2 individual nodes and the value for Prop1 will be AC_123.

  • Murali Pasumarti
    Murali Pasumarti Member Posts: 498 Gold Badge
    edited Oct 6, 2015 10:02AM

    Let me test..trying to get my VM up, can you check at your end.

  • Denzz
    Denzz Member Posts: 813 Gold Badge
    edited Oct 6, 2015 10:08AM

    I think the the property will return

    AC_123!Shared2 & AC_123!Shared1

    different for both the nodes since that is what their Abbrev's are

    AC_123 is their primary node's name.

  • Murali Pasumarti
    Murali Pasumarti Member Posts: 498 Gold Badge
    edited Oct 6, 2015 10:43AM

    You are right, makes sense, was in a wrong impression, should have tried instead of leaving it:-)

    Denzz
  • ScottQ
    ScottQ Member Posts: 149 Blue Ribbon
    edited Oct 6, 2015 11:25AM

    The VersionUniqueProp method can only use global properties.  Doesn't any property having to do with shared nodes, like Core.SharedFlag_MDM, have to be local by definition?

  • Denzz
    Denzz Member Posts: 813 Gold Badge
    edited Oct 6, 2015 11:50AM

    @ScottQ

    Core.SharedFlag_MDM is a Global property and so can be referenced in a Global derived property.

    Thanks

    Denzz

    ScottQ
  • MNW
    MNW Member Posts: 118
    edited Oct 22, 2015 10:02AM Answer ✓

    Denzz, thanks for your help so far.

    I created a global property with the logic you specified and used the Evaluate function inside the property definition to evaluate a shared node and a primary node. It works as intended! But when I return to my hierarchy and check the property value on the nodes themselves, the functionality fails - Core.SharedFlag_MDM always returns false.

    So I tested with a local property, and in both the evaluate and hierarchy view, it works as intended.

    It appears the SharedFlag_MDM property always returns FALSE in global properties. We tested the same thing using the POS function and achieved the same results; POS always returns 0 in global properties, but returns the expected value in local properties.

    Sounds like SR material unless anyone else can elaborate on why this might be?



    edit: I figured out why this is the case. Global Property values must be the same across all nodes. So in the following instance, if I create a global property called "IsShared" and set its value to PropValue(Core.SharedFlag_MDM) the following will happen:

    Core.AbbrevCustom.IsShared
    AC_123FALSE
    AC_123:Shared001FALSE

    Because IsShared is Global, its value cannot be different across shared or linked nodes. But if we set IsShared to Local we will see our intended functionality:

    Core.AbbrevCustom.IsShared
    AC_123FALSE
    AC_123:Shared001TRUE

    So the issue with this now, is that the VersionUniqueProp and VersionUnique2Prop validations require global variables to function. And because the Core.SharedFlag_MDM property and POS function are incompatible with global properties, this functionality will not work for us.

This discussion has been closed.