tag:blogger.com,1999:blog-6105939709821283312024-03-12T21:02:12.452-07:00Enovia Tech TipsSarma Thttp://www.blogger.com/profile/16122257588428511268noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-610593970982128331.post-57999930579271656162009-08-30T19:17:00.000-07:002009-08-30T19:37:58.323-07:00Table Column Sort type settingsHave you ever had to show a string attribute in a table as a column, and had to sort it as a numeric value.??<br /><br />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.<br /><br />This happens because the numbers are treated as alphabets and since 2 is greater than 1, 23 is displayed last.<br /><br />How to fix this????<br /><br />Obviously we have to make sure that the values are treated as numbers and not alphabets while sorting happens.<br />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.<br /><br />modify table <tablename> system column modify <columnname> add property "sorttype" "numeric" ;<br /><br /><br />Make sure to reload cache after executing this mql ..Sarma Thttp://www.blogger.com/profile/16122257588428511268noreply@blogger.com0tag:blogger.com,1999:blog-610593970982128331.post-37205806329661662172009-07-17T15:06:00.000-07:002009-07-17T15:23:03.883-07:00CaseSensitive settingsSearchs in enovia are by default Case Sensitive.<br />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".<br />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".<br /><br />Thankfully, we can enable and disable "case sensitivity" in enovia according to our needs.<br /><br />Below are the MQL statements to enable and disable case sensitivity.<br /><br />set system CaseSensitive On;<br />set system CaseSensitive Off;<br /><br />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.<br /><br />if you have any questions regarding this post, Please let me know.Sarma Thttp://www.blogger.com/profile/16122257588428511268noreply@blogger.com0tag:blogger.com,1999:blog-610593970982128331.post-2142885151642246442009-07-08T15:00:00.000-07:002009-07-08T15:01:17.139-07:00Trigger configuration for attribute value validationThere is a OOTB tcl (eServicecommonTrigcAttribute_if.tcl) which can be configured to validate attributes on promote action / check events. Below are the parameters<br /><br />attribute[eService Program Argument 2].value = UNASSIGNED,UNASSIGNED<br />attribute[eService Program Argument 1].value = attribute_ResponsibleDesignEngineer,attribute_ResponsibleManufacturingEngineer<br />attribute[eService Program Name].value = eServicecommonTrigcAttribute_if.tclSarma Thttp://www.blogger.com/profile/16122257588428511268noreply@blogger.com2tag:blogger.com,1999:blog-610593970982128331.post-71622856880159318362009-06-18T11:07:00.000-07:002009-06-18T11:10:01.669-07:00MQL Statements for Server AdministratorsGiven below are the some mql statments that can used to understand the status of the enovia server.<br /><br /><ul><li>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.</li></ul><span style="font-weight: bold;">MQL Stmt</span><br /><span style="font-style: italic;">sessions;</span><br /><ul><li>The output of this command will be in the following format</li><li><span style="font-size:85%;">USERNAME MACHINENAME PROGRAMNAME</span></li></ul><br /><br /><ul><li>This next command will be helpful in understand the memory status of the enovia server at any given point in time.</li></ul><span style="font-weight: bold;">MQL Stmt</span><br /><span style="font-style: italic;">monitor memory;</span><br /><ul><li>The output of this command will be in the following format.</li></ul><span style="font-family: verdana;font-size:85%;" >Used heap 32822573 bytes, free heap 441200 bytes.<br /><br />Matrix Memory Manager:<br /><br />31703941 bytes of memory allocated in 2783 blocks, highwater= 31885325 bytes<br />27754496 bytes of memory reserved in 1694 blocks<br />JVM total memory: 63778816<br />JVM max memory: 66650112<br />JVM free memory: 36291952<br />JVM memory in use: 27486864<br />JVM available processors: 2</span>Sarma Thttp://www.blogger.com/profile/16122257588428511268noreply@blogger.com0tag:blogger.com,1999:blog-610593970982128331.post-29013748973065375152009-06-18T11:02:00.000-07:002009-06-18T11:07:15.527-07:00MQL Enchancements<ul><li>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.<span style="font-weight: bold;">MQL Stmt</span></li></ul><span style="font-style: italic;">modify bus <tnr> current "<state>"; </state></tnr></span><br /><ul><li> Triggers do not fire.</li><li> History records are not added.</li><li> No signature affected.</li></ul><br /><ul><li>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)</li></ul><span style="font-weight: bold;">MQL Stmt</span><br /><span style="font-style: italic;">temp query bus </span><tnr><span style="font-style: italic;"> orderby -type orderby name order +attribute[Color]; </span><br /></tnr><ul><li><tnr>- for descending + for ascending. </tnr></li></ul><tnr><br /></tnr><ul><li><tnr>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.</tnr></li></ul><tnr><br /><span style="font-weight: bold;">MQL Stmt</span><br /><span style="font-style: italic;">query connection to "Project Space" "TestProj" 21240970107702 select id;</span><br /><span style="font-style: italic;">query connection [type PATTERN];</span><br /></tnr><ul><li><tnr>There are many more different options that can be used with this statement. For more information: "help connection" on mql prompt. </tnr></li></ul>Sarma Thttp://www.blogger.com/profile/16122257588428511268noreply@blogger.com0tag:blogger.com,1999:blog-610593970982128331.post-26599936102064816302009-06-09T12:27:00.000-07:002009-06-09T12:28:59.612-07:00Using "const" for reserved words in SEARCHESReserved 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’.<br />where 'attribute[Regression]==first';<br /><br />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. <br /><br />For this type of situation, use const to indicate that whatever follows should not be evaluated. <br /><br />For example: where 'attribute[Regression]==const"first"';<br /><br />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.<br /><br />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.<br />Here are some examples of queries that will NOT return correctly without using const:<br /><br />attribute[Some Attribute]==‘first’<br />attribute[Some Attribute]==‘FIRST’<br />attribute[Some Attribute]=="Current"<br />attribute[Some Attribute]=="owner"<br />description=="Current"<br />description=="policy"<br /><br />However, the following will return correctly:<br /><br />attribute[Some Attribute]==‘my first order’<br />attribute[Some Attribute]~=‘*first*’Sarma Thttp://www.blogger.com/profile/16122257588428511268noreply@blogger.com0tag:blogger.com,1999:blog-610593970982128331.post-8915130652820240432009-05-29T08:19:00.000-07:002009-06-09T12:29:52.500-07:00Default User Name on LoginScreen for Business Matrix or SystemHave 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.<br /><br />Its time to stop being annoyed, here is a solution for that problem.<br /><br />Open your Matrix.ini file which is present by default in C:/Windows.<br />Add the following line to it.<br /><br />USER=creator<br /><br />What is this setting doing?? <br /> This setting is telling the applications (Business,Matrix, and System) to use creator as the default user name.<br /><br /><br />Hope this will save some time for all of you ...Sarma Thttp://www.blogger.com/profile/16122257588428511268noreply@blogger.com0tag:blogger.com,1999:blog-610593970982128331.post-88483583859797910432009-05-26T07:45:00.000-07:002009-05-26T07:47:28.080-07:00Type Ahead (Auto Complete) in UI Webforms / TablesToday I would like to share Matrixone's Type Ahead feature a feature very much similar to Google's Auto Complete.<br /><br />The Type Ahead feature stores text values entered in form text fields, then displays the most recent entries the next time that the user enters that field. They can then select from the list rather than needing to type the complete value or use a chooser.<br /><br />If the field uses a JPO:method, the functionality is slightly different. The field pops up the list of recently-entered values as described above. When the user types something that does not match any of those values and exceeds the character count setting, the JPO is triggered to return the list of matching values returned by the JPO method.<br /><br />Below are the <span style="font-weight: bold;">UI field settings</span>:<br /><br />· <span style="font-weight: bold;">TypeAhead</span>=true|false Enables type ahead. If not provided, automatically set to true. Typically used to disable type ahead for a field.<br />· <span style="font-weight: bold;">TypeAhead Program</span>—Name of the JPO called to retrieve a list of possible values. This JPO is called after the user types the specified number of characters. A JPO is typically used by fields that are normally populated using choosers.<br />· <span style="font-weight: bold;">TypeAhead Function</span>—The name of the JPO method used in conjunction with the TypeAhead Program setting.<br />· <span style="font-weight: bold;">TypeAhead Character Count</span>—Overrides the emxFramework.TypeAhead.RunProgram.CharacterCount system property. This setting may be useful for fields whose values may all contain the same prefix.<br />· <span style="font-weight: bold;">TypeAhead Saved Values Limit</span>—Overrides the emxFramework.TypeAhead.SavedValuesLimit system property<br /><br />The configured TypeAhead program should extend <span style="font-weight: bold;">emxTypeAhead</span> and the function should have the below format<br /><br /> public String test(Context context, String[] args) {<br /> String filter = args[0];<br /> <br /> addValue("first", "hidden_first");<br /> addValue("second", "hidden_second");<br /> addValue("third", "hidden_third");<br /> setAllDataSentAttribute(true);<br /> return (toXML());<br /> }<br /><br />This Type Ahead feature is implemented using the Matrix Cue objects which are context specific just like the sets, so the stored / returned values are also specific to the context user. The number of values stored for each user per field depends on the value for the emxFramework.TypeAhead.SavedValuesLimit property in the emxSystem.properties file. The default is 10 unique values and can be overridden at the field level using the Type Ahead Saved Values Limit setting.<br /><br />This Type Ahead feature can also be implemented in custom forms using framework’s tag library, please refer to the app dev guide for more details.Sarma Thttp://www.blogger.com/profile/16122257588428511268noreply@blogger.com0tag:blogger.com,1999:blog-610593970982128331.post-60866923980287646082009-05-21T19:51:00.000-07:002009-05-21T19:56:42.020-07:00Dynamic Columns in UI TableDiscussed here is the UI Table feature that was introduced recently into enovia.<br /><br />Have you ever run into a situation where the requirement said that the display screen should have multiple columns depending on the input, and we had to write a JSP to implement this, because UI Table could not display multiple columns depending on the input?<br /><br />This kind of requirement can be implemented using dynamic columns feature in UI Table.<br /><br /><span style="font-weight: bold;">Dynamic Columns in UI Tables</span><br /><br />Traditionally we used to define a certain number of columns in the UI Table definition, and all those columns were displayed on the screen.<br />With dynamic columns feature we can define the number of columns displayed on the screen , on the fly using a JPO.<br />Here is how you define a dynamic column<br /><br /><span style="font-weight: bold;">UI Table column definition.</span><br /> • Column Type = Dynamic<br /> • Dynamic Column Program = JPO name<br /> • Dynamic Column Function = JPO method name<br /> In this JPO Method you can define the # of columns that will be displayed on the screen.<br /> The output of this column to should be a Maplist, that will contain the # of maps that is same as the # of columns you want to display.<br /> The format of the Map per column is given below.<br /><br /> if colMap is the Map for one column, then at a minimum the Map should contain.<br /> <br /> colMap.put("name", "<<name of="" the="" column="">Name of the Column>" );<br /> colMap.put("label", "<<lable for="" the="" column="">Lable for the Column>" );<br /> colMap.put("settings",<<map with="" settings="" for="" the="" column="">Map with the settings for the column>);<br /> <br /> example for settings Map:<br /><br /> settingsMap.put("Registered Suite","Framework");<br /> settingsMap.put("Admin Type","Type");<br /> settingsMap.put("Target Location","content");<br /><br /><br />Please let me know if you have any questions.</map></lable></name>Sarma Thttp://www.blogger.com/profile/16122257588428511268noreply@blogger.com1tag:blogger.com,1999:blog-610593970982128331.post-63690160105520290002009-05-21T19:45:00.000-07:002009-05-26T10:51:30.373-07:00UI Table Validations<meta name="verify-v1" content="z9LOamdxUy+ttLvLnP9I3derc9PTy+i4k0uremprqX4=" />
<br />
<br />Basically this is explaining how to do validations on tables.
<br />
<br />Last week I had to do number validation on a emxTable edit to allow user only to key in values between 1-999. Initially thought of handling it with the attribute range but it becomes <span style="font-size:+0;"></span>a huge drop down to choose from, that is when I opted for custom JavaScript validation on edit table (this valid for forms)
<br />
<br />Below is a quick summary of the implementation:
<br />
<br />1. You can use a custom JavaScript method to validate any field when it is displayed in Edit mode and the Editable setting is true. The method name is configured for the field with the <b>Validate=methodName</b> in table setting. The method can refer to the control with the keyword “this”.
<br />2. For example, for a field with the Validate=validatePortfoilioPriority setting, the system calls the validatePortfoilioPriority () JavaScript function (shown below). <?xml:namespace prefix = o /><o:p></o:p></span><p></p><p class="MsoNormal"><span style="font-family:';color:black;">The function must return true for successful validation.
<br />
<br />
<br />// JavaScript
<br />function validatePortfoilioPriority() {
<br />if(condition) {
<br />} else (condition) {
<br />}
<br />return true;
<br />}
<br />
<br />
<br />3. Add this function to any JavaScript file or any JSP file. Make sure the name of the file is specified in emxSystem.properties file with the key SUITEKEY.UIForm.ValidationFile. You can assign one or more
<br />files (separated by a comma) as the property value.
<br />
<br />eServiceSuiteProgramCentral.UIForm.ValidationFile = scripts/bcValidation.jsp
<br />You can assign one or more files separated by a comma as the property value
<br />Please refer to Enovia Matrixone Application Development Guide for more detailed information.</span></p><p class="MsoNormal">
<br /></p><p class="MsoNormal">
<br /><span style="font-family:';color:black;"><o:p></o:p></span></p><p class="MsoNormal"><b>Note</b>: For reference just sees the “<b>bcProjectDashboardEditTable”</b> table in clear case (spinner/programcentral/business) and the method what I wrote is put in “<b>bcUIFormValidation.jsp”</b> in programcentral. And search for the fallowing line</p><p class="MsoNormal"><b>“eServiceSuiteProgramCentral.UIForm.ValidationFile = emxProgramCentralUIFormValidation.jsp,bcUIFormValidation.jsp”</b> in emxSystem properties file.<span style="font-size:+0;"> </span>This is the way we have to give the name of the file in emxSystem Properties file.</p>
<br />Sarma Thttp://www.blogger.com/profile/16122257588428511268noreply@blogger.com1