Sunday, August 30, 2009

Table Column Sort type settings

Have you ever had to show a string attribute in a table as a column, and had to sort it as a numeric value.??

If yes, you will know, that when sorting this column, you see that numbers get sorted as alphabets. Here is what i mean. If you have the values, 1,12,15,23,103, this will be order in which the number will appear after the sorting in ascending order, 1,12,15,103,23.

This happens because the numbers are treated as alphabets and since 2 is greater than 1, 23 is displayed last.

How to fix this????

Obviously we have to make sure that the values are treated as numbers and not alphabets while sorting happens.
The way to do this is to modify the table column definition and add a property "sorttype" to the column. Here is the mql to modify the existing table definition.

modify table system column modify add property "sorttype" "numeric" ;

Make sure to reload cache after executing this mql ..

Friday, July 17, 2009

CaseSensitive settings

Searchs in enovia are by default Case Sensitive.
Imagine the pain of the end user when trying to search for a person's userid if the users are named in mixed case eg: username "Mike Smith" and userid "mSmith".
Same goes for trying to find a person with last name "O'Connell", you never know if the name was entered as "o'Connell" or "O'connell" or "o'connell".

Thankfully, we can enable and disable "case sensitivity" in enovia according to our needs.

Below are the MQL statements to enable and disable case sensitivity.

set system CaseSensitive On;
set system CaseSensitive Off;

Please be aware that this is a system level settings, and the decision to enable or disable should be taken in the initially stages of the implementation.

if you have any questions regarding this post, Please let me know.

Wednesday, July 8, 2009

Trigger configuration for attribute value validation

There is a OOTB tcl (eServicecommonTrigcAttribute_if.tcl) which can be configured to validate attributes on promote action / check events. Below are the parameters

attribute[eService Program Argument 2].value = UNASSIGNED,UNASSIGNED
attribute[eService Program Argument 1].value = attribute_ResponsibleDesignEngineer,attribute_ResponsibleManufacturingEngineer
attribute[eService Program Name].value = eServicecommonTrigcAttribute_if.tcl

Thursday, June 18, 2009

MQL Statements for Server Administrators

Given below are the some mql statments that can used to understand the status of the enovia server.

  • This command will be helpful in understanding which users are currently using the enovia database. This command will tell you the user and machine and the process that is being used to connect to the enovia data base.
MQL Stmt
  • The output of this command will be in the following format

  • This next command will be helpful in understand the memory status of the enovia server at any given point in time.
MQL Stmt
monitor memory;
  • The output of this command will be in the following format.
Used heap 32822573 bytes, free heap 441200 bytes.

Matrix Memory Manager:

31703941 bytes of memory allocated in 2783 blocks, highwater= 31885325 bytes
27754496 bytes of memory reserved in 1694 blocks
JVM total memory: 63778816
JVM max memory: 66650112
JVM free memory: 36291952
JVM memory in use: 27486864
JVM available processors: 2

MQL Enchancements

  • Modify bus statement has some enhancements, One the of the enhancements is given below. I think this one will be helpful in data migration scripts mostly, but i am sure we will find other uses for this too.MQL Stmt
modify bus current "";
  • Triggers do not fire.
  • History records are not added.
  • No signature affected.

  • MQL Statement "temp query bus" has and new clause with new operators. i think this will be help full for us when we want to show list of objects in particular order(Sorting)
MQL Stmt
temp query bus orderby -type orderby name order +attribute[Color];
  • - for descending + for ascending.

  • Finally an MQL Statment to query connections. I think this MQL statement has been awaited for a long time. Using this mql statement we can query for the connection objects and the attributes in the connections much easier.

MQL Stmt
query connection to "Project Space" "TestProj" 21240970107702 select id;
query connection [type PATTERN];
  • There are many more different options that can be used with this statement. For more information: "help connection" on mql prompt.

Tuesday, June 9, 2009

Using "const" for reserved words in SEARCHES

Reserved words such as keywords and select expressions must be afforded special consideration in exact equal (==) Matrix expressions. For example, the following statement might be written to find business objects where the value of the attribute ‘Regression’ is ‘first’.
where 'attribute[Regression]==first';

But because ‘first’ is a select keyword that returns the first revision of a business object and is evaluated as such, the result of the evaluation — rather than the literal word ‘first’— is compared with the attribute.

For this type of situation, use const to indicate that whatever follows should not be evaluated.

For example: where 'attribute[Regression]==const"first"';

Const has three possible forms: all uppercase, all lowercase, and initial letter capitalized followed by all lowercase. No space can appear after the word const. It must be followed by a quote (double or single, depending on the syntax of the rest of the statement). Almost any character can appear within the quotes, with the exception of backslash and pound sign. The characters between the initial and closing quotes remain unevaluated.

If your implementations are using JSP/Tcl to compose a where clause dynamically (that is, using a variable to construct the where clause), the const syntax must be used because the value you pass in could be a ENOVIA Collaboration Platform keyword. If this happens, the where clause will not return an error, but you will get unexpected results.
Here are some examples of queries that will NOT return correctly without using const:

attribute[Some Attribute]==‘first’
attribute[Some Attribute]==‘FIRST’
attribute[Some Attribute]=="Current"
attribute[Some Attribute]=="owner"

However, the following will return correctly:

attribute[Some Attribute]==‘my first order’
attribute[Some Attribute]~=‘*first*’

Friday, May 29, 2009

Default User Name on LoginScreen for Business Matrix or System

Have you ever been annoyed that every time you open enovia's "Business", "Matrix" or "System", you have to remove the name which is by default your login id and replace it with creator.

Its time to stop being annoyed, here is a solution for that problem.

Open your Matrix.ini file which is present by default in C:/Windows.
Add the following line to it.


What is this setting doing??
This setting is telling the applications (Business,Matrix, and System) to use creator as the default user name.

Hope this will save some time for all of you ...