Skip to Content
avatar image
Former Member

MetaData VBScript Check Model

I'm trying to create a custom Check model. In the " Extensions Properties" i have Added the MetaClasses "Key", I need check the Constraint Name, but i can't find way to do. For example, i know if i put obj.Name they will return the Key Name, obj.code the code nome, but how can i return the contraint name? i've try obj.ConstraintName but doesn't work.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 19, 2016 at 09:07 AM

    HTH

    BR,

    Rafal

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 16, 2016 at 10:33 AM

    Have you considered changing the template PD uses to create Constraint Names? You'll find it in the database definition file. From memory, it's here - SQL \ Objects \ Key \ Constname

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 16, 2016 at 01:07 PM

    I really didn't get it. Sorry. Let me try explain better this time. We receive a lot of PDM files to check the Pattern based on our Template. So i created a new Extension (Model>Extensions...) In the Extensions Screen i added four MetaClasses in the Profile Folder, (Column,Index,Key,Table). In the Key MetaClass i created a new "Custom Check" and i created a VB script to check the "CODE" lenght.

    if Len(obj.code) > 30 then output "ERROR-> Size greater than 30 characters".

    But I need to create a check for the Contraint Name from the Key Properties. I need to make the same script but checking the Constraint Name.

    Add comment
    10|10000 characters needed characters exceeded