Skip to Content
0

MetaData VBScript Check Model

Dec 15, 2016 at 07:50 PM

53

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Rafal Kallus Dec 19, 2016 at 09:07 AM
1

HTH

BR,

Rafal


gmrex.png (46.5 kB)
Show 2 Share
10 |10000 characters needed characters left characters exceeded

Thanks @Rafal, work's perfect!

0

pls mark the post as answered

0
George McGeachie Dec 16, 2016 at 10:33 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Sorry, it's

Script\Objects\Key\ConstName

default template for Oracle 12 is

AK_%.U18:AKEY%_%.U8:TABLE%

0
Rafael Santos Dec 16, 2016 at 01:07 PM
0

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.


key-properties.png (15.7 kB)
extensions.png (51.0 kB)
Share
10 |10000 characters needed characters left characters exceeded