Forum Stats

  • 3,814,612 Users
  • 2,258,890 Discussions
  • 7,892,781 Comments

Discussions

DRM validation formula

user9513294
user9513294 Member Posts: 107

Hi. I have a custom property in DRM that I want to add a real-time validation for, to be used during a hierarchy import from a flat file.

The custom property is used as a Planning attribute and can have a value of either A or B. I'm assuming that the best way to do a validation on the value of a custom property definition is with a formula?

Can someone give me an example formula syntax to validate that a custom property can only contain the values "A" or "B" ?

Thanks!

Tagged:

Best Answer

  • User_RR4O9
    User_RR4O9 Member Posts: 176 Bronze Badge
    edited Jul 3, 2016 8:39PM Answer ✓

    Hello,

    if you use the "Formula" class (node level), the following formula should work.

    If(or(equals(string,PropValue(Custom.PropName),A),equals(string,PropValue(Custom.PropName),B)),True,False)

    But, I wouldn't set this as a real-time validation. I would do batch. Plus, I am not sure how you would set this to an import. Maybe I am missing something.

    user9513294

Answers

  • User_RR4O9
    User_RR4O9 Member Posts: 176 Bronze Badge
    edited Jul 3, 2016 8:39PM Answer ✓

    Hello,

    if you use the "Formula" class (node level), the following formula should work.

    If(or(equals(string,PropValue(Custom.PropName),A),equals(string,PropValue(Custom.PropName),B)),True,False)

    But, I wouldn't set this as a real-time validation. I would do batch. Plus, I am not sure how you would set this to an import. Maybe I am missing something.

    user9513294
This discussion has been closed.