- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎14-05-2012 04:09 PM
Hello everyone,
Is there a way to disable a control on a column about data type requirement ?
I can't currently change properties of the column from the property page (but I can do it from the explorer window ).
It seems that disabling the standard modeling rule "3.2 A Column must have a valid Datatype for the Database" is not enough.
Jean-Yves
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎15-05-2012 06:17 PM
Thank you Jérôme,
you're right, creating a pivot class for populating the datatype can be a solution to change properties of a column.
I just thought there could be a better solution that bypass datatype use.
Jean-Yves
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎15-05-2012 02:20 PM
OK. So the point is not to disable the rule but to understand the warning message 'Vous devez renseigner la propriété Data Type'.
Apparenlty there is an inconstency regarding datatype for this column. I do not know the context and the actions triggering this message so it is difficult to provide a precise answer.
However note the following if you need to change the datatype of a column object with APIs or command files:
- The MetaAttribute 'DataType' stores a pivot value
- This value is interpreted using other parameters such as the RDBMS version of the database owning the column, the property length, the property decimal. The result of this calculation is displayed with the the MetaAttribute value 'Data Type'
As a consequence, outside property pages:
- both 'DataType' and 'Data Type' can be read
- only 'DataType' can be set
See also in the following solution http://community.mega.com/t5/custom/page/page-id/mega-kb-solution?sid=50120000000mqWSAAY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎15-05-2012 11:56 AM
Hello Jérôme,
thank you for your reply.
I can't apply your solution because I need to keep some others standard and custom modeling rules.
In my previous post, I talk about a "control" because I don't know where the alert window come from.
You can take a look at the screenshot adding to this post (in french).
This alert window appears each time I try to change properties from the property page of a column.
My first reaction was to check modeling rules between column and datatype, and I found this one :
"3.2 A Column must have a valid Datatype for the Database".
So, for testing purpose, I modified the macro linked to this one for always having a positive result.
Original script
Sub RuleApply (oToBeRuled, oRule, sParameters, bRuleResult)
If oToBeRuled.GetCollection("~7MmfquSJxya0[Datatype]").count = 1 then
bRuleResult = true
Else
bRuleResult = false
End If
' Free all objects used in the procedure
End Sub
Modified script
Sub RuleApply (oToBeRuled, oRule, sParameters, bRuleResult)
bRuleResult = true
End Sub
Sadly, alert window still appears.
That's the reason why I suppose this kind of control come from somewhere else, but I don't really know how to disable it.
Curiously, if I change column properties from explorer window, no problem !
Jean-Yves
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎15-05-2012 09:13 AM - edited ‎15-05-2012 09:17 AM
Hello Jean-Yves
There is not configuration that enable to disable a modeling rule (what you call control) but keep it ready to work.
On a technical level, to fully disable a modeling rule, you can disconnect several links
- Between the modeling rule and the Modeling Regulation (package of modeling rules)
- Between the modeling rule and the Metatest (link 'Implementing MetaTest')
- Between the modeling rule and the MetaClass (link 'Ruled MetaClass')
I hope it answers your question
