cancel
Showing results for 
Search instead for 
Did you mean: 

Get value from attribute on extension

02-11-2021 9:50 PM
thiago_farias Explorer
745 views 4 comments
0 Likes
SAP Managed Tags
Subscribe

I created an new extension. On profile, I created under de Table Metaclass a new boolean attribute.

When I use this new attribute (%D:myExtensionAttribute%) on DBMS Properties\ORA11GR1::Script\Objects\Table\BeforeCreate, I can access the value expected correctly.

When I use this new attribute on DBMS Properties\ORA11GR1::Script\Objects\Reference\BeforeCreate, I can't access the expected value and I got an error: [translation error] unresolved member:

I tried without success:

%D:myExtensionAttribute%

%Table.myExtensionAttribute%

Is there a way to access this value?

Thanks in advance! Best regards!

0 Likes

Accepted Solutions (0)

Answers (2)

Answers (2)

Ondrej_Divis
Contributor

The answer by Chris is correct, just don`t forget the .D: option, since your extended attribute is defined outside of the definition file. So correct macro should look like this:

%.D:ParentTable.myExtensionAttribute%

%.D:ChildTable.myExtensionAttribute%

HTH,

Ondrej

thiago_farias
Explorer
0 Likes

Thank you Ondrej!!!! Thank you Chris!!! Now it works!!!

I needed to use the ".D:" option. I didn't know that the reference to the table changes depending on the escope. When using on Reference, I needed to use %.D:ChildTable.myExtensionAttribute%. When using on Index, I needed to use %.D:Table.myExtensionAttribute%.

Thank you!

ChrisBaker
Product and Topic Expert
Product and Topic Expert

Which end of the reference do you want?

I think you need %ParentTable.myExtensionAttribute% or %ChildTable.myExtensionAttribute%

Chris

thiago_farias
Explorer
0 Likes

Hi Chris!

I got this message:

1 error(s), 0 warning(s)

(2) (Reference "TableA_X_TableB"):
  [translation error] unresolved member: myExtensionAttribute

I tried %ParentTable.myExtensionAttribute% also and got the same error as using %Table.myExtensionAttribute% or %PARENT.myExtensionAttribute%.

Tks!

(I'm using PowerDesigner 16.5.0.3982)