Tag Archives: M3

M3 TechEd

I’m at M3 TechEd in Stockholm. If you are attending don’t miss checking out the hands-on open lab. There are a lot of experts available to help you and show you what we are working on and how we can help you be successful.

50D4E859-514E-4A66-A44B-D7676036A32B

Ole Rasmussen presenting M3 product strategy.

Great location at Elite Hotel at Nacka stand. I came in early.

 

I’ll be on two tracks, Extensibility and User Experience, see you there 😀.

M3 Search Examples

M3 has created a Knowledge base article on the search syntax for Search in M3 13.3 and 13.4. M3 Infor Enterprise Search is a great tool which can greatly improve your workflow when used in the way it has been designed to work.

Depending on how you are using Enterprise Search (IES) today, you might have encountered a few instances where it has not retrieved the desired result.

This can in many cases be addressed by altering your search query to be better suited for the Lucene Search Engine which IES is built upon.

In this blog post I’ll do a quick overview of some of the queries from the examples in the Knowledge based article as a introduction but I recommend you to read the full article as it contains even more examples. I just wanted to take some of the material and the references so that it is easier to find if you search for tips on this blog, which I know a lot of our readers do.

Please note that if you are new to Enterprise Search there are  available courses and How-to videos at the Sales Portal and the Infor Campus.

Simple search

This is the simplest form of search with entry of full words. Note that search is always case insensitive. Searching for cheese would give you the following result:
cheese

You can enter multiple words in the search field but those values have to be displayed in the list. The default behaviour when using multiple words in search is applying AND for all words. This means that they have to exist in one or more columns. Using OR means one of them must exist in one of the columns which will result on more hits. Use parentheses to combine blocks of AND and OR. Use wild card to enter the first part of a word. Or a ‘?’ to replace a single character. Note that you can’t replace blank space.

cheese2

Examples:
cheese OR juice
cheese OR (juice 011215) - Combine with ()
chee* - starts with chee
chee*jui?e - ? replace a single character

To limit the search to a specific column, right click on the column and select ‘Add to search’. It will add a column prefix to the search.

addtosearch


ITDS:Cheese

Dates and numeric values are entered in the same date format as the user has in MNS150, the user master. Dates can be entered with 6 or 8 digits.

Advanced search

Intervals
Intervals are done using the following two formats [ x TO y] or { x TO y } or any combination of them. Usage of [] means that the range should be included in the search where as {} means that the range should be excluded.

Examples

STQT:[100 TO 480]
STQT:[* to 0} - find all items with negative quantity

Not conditions and use of ?
Not conditions are a bit special since they must start with another query and then the NOT condition can be introduced. The tip if there is no such natural condition is to start with the company number and then add the NOT search. The company number will search the entire table. An example query in MMS002 of all items that have not been part of a stock take in this year will look like this:

CONO:790 NOT INDT:YEAR(0)

Note the YEAR(0) function that will translate to an interval covering the to and from dates of the current year. There are a number of functions that can be used to create useful Macros that can be saved to favorites, canvas, as menu option or in toolbox area.

Creative usage of the ? allows for a simple search for all records with supplier number. This since ? only finds records with a character in the position. Blanks are omitted. Query SUNO:?* gives you all records with a supplier number in this case. For numeric fields you use the NOT statement like CONO:780 NOT STQT :0.
SUNO:?*
CONO:780 NOT STQT :0

Fuzzy search
The ~ is used for a fuzzy search that is useful for finding spelling errors and similar texts. An example would be a query like ‘min*~’ which would produce hits even if there is no exact match on anything starting with min, for example mild would also be a hit in this case. Not that it cannot be used for numeric values.

The full article covers more examples!

M3 IES reserved word and functions

SortBy:x,y,!z Sorts search result in x, y z hierarchy. The ! Prior field name perform a descending sorting (NCR 6670 and 6671)
SearchFields:x;y Limits search to listed fields x, y etc. Increases performance and can eliminate false hits
YEAR(x) Replaces with date range of year relative to current year x=-1 equals last year etc
MONTH(x) Same as YEAR but for month
WEEK(x) Same as YEAR but for week
DATE(x) Similar to YEAR but replaces with specific date
<xxxx> List & list header based replacements to query string. (NCR 6813)

All below are described in NCR 6220
Using the value within you can use the following replacement variables.

<USID>   Replaced by logged on user id
<CONO> Replaced by logged on company number
<DIVI>     Replaced by logged on Division. Note – same as <CurrentDivison>
<FACI>    Replaced by default facility from user master (MNS150)
<CUNO> Replaced by customer no from user master
<LNCD>  Replaced by language code from user master
<TIZO>    Replaced by time zone from user master
<WHLO> Replaced by warehouse from user master
<DEPT>   Replaced by department from user master
<MNVR> Replaced by menu version from user master
<DFMN> Replaced by menu name from user master
<CurrentLanguage> Replaced by currently used language in M3 (in case of switched language during logged in session)
<CurrentDivision> Current division. Note that this is the same as DIVI.

Reserved word for key search only

  • <QRY> Replaced by entered query in the search string
  • MAXJOIN:x Used to change number of records used in the key search join (default set in IES local management pages) (NCR 4351)
  • NOOPT Used when multiple key searches done to same table (like find items with attribute x, y but NOT z or items existing in warehouse a, b and c (NCR 4349)

M3 IES Stop words

Stop words in IES has the meaning of words that are not indexed and are automatically removed from the search query. Examples of stop words are “and”, “or” “etc” and other similar types. IES, by default has a set of English based stop words which apart from above examples also includes “a”, “by”, “is”, “as” plus about 20 other words. Unfortunately in many cases when searching ERP type of data you might want to search for “factor a”, the Swedish word for ice “is” etc.

The work around for this is to add a new stop word in the IES admin pages. Make sure it is something never search for like “lksdhja7789”. By doing that the default stop words are not used anymore. Please note that affected tables like MITMAS, MITLAD, OCUSMA, CIDMAS etc need to be re-indexed after this has been done.

Read more examples in the KB.

Custom data templates in M3 lists with JScript

Changing the appearance of M3 list cells with conditional styles is easy but in some cases you need to do things that require logic that cannot be expressed with conditional styles alone. This post will show you how to change the style of list cells in M3 lists using JScript, custom data templates and custom data template selectors.

Continue reading

Hyperlink columns in M3 lists

This post is a follow-up to a question in the comment section on a previous post called Adding a new column in a M3 List. The question was how to add a clickable hyperlink in a new list column. This could be solved in a generic way by creating your own data template and template selector or by reusing existing functionality in MForms. In this post I will just cover the second part by reusing existing functionality. The more generic solution for custom content in list cells might be covered in a future post.

Continue reading

Controlling the user’s canvas with stand-alone Jscripts

The user’s canvas is where the user has his shortcuts and widgets monitoring business data. The first time the user starts Smart Office she will get the default Canvas with the content that an administrator has configured. In this post I’ll show you how to share a canvas file on a fileshare and create a Jscript that will load the Canvas everytime Smart Office starts.

Continue reading

Introduction to MForms extensions

When extending the functionality of M3 panels in MForms you have three different options and these are JScript files, Script assemblies and MForms extensions. MForms extensions allow you to do similar things as with a regular JScript files but extensions are Smart Office features, written in a .NET language such as C#. The way extensions are deployed, configured and registered is also somewhat different compared to how you usually do with JScript.

This post is a brief introduction of how to create and deploy an MForms extension using the Smart Office SDK. Note that if you don’t have access to the SDK you will not be able follow along in the example on your own. I will also assume that you are familiar with the Smart Office SDK and will mainly focus on what is specific for MForms extensions.

Continue reading

Script assemblies in MForms

The most common way to extend the functionality of M3 panels in MForms is to use JScript files but there are other options such as Script assemblies and MForms extensions. With Script assemblies you can write code in most languages supported by .NET such as C# and VB.Net and you can actually debug your code using Visual Studio. Instead of deploying the script as a JScript file you use a .NET assembly in the form of a DLL file.

Continue reading

Inline personalizations in M3 Mashups

The Inline personalizations functionality in M3 Mashups can be used to deploy personalizations as part of a Mashup. Instead of relying on the personalizations for the regular programs you can create custom personalizations that are only used in Mashups and that do not affect the other personalizations.

Support for inline personalizations was added in Smart Office version 10.0.5.0 but there have been some fixes so this functionality should only be used with Smart Office 10.0.5.1 or later.

Continue reading

Getting values from M3 panels with Jscript

Almost every M3 script needs to get values from the panel it is running on at some point and there are quite a few different ways to accomplish this. The script might need the value of a specific TextBox, the value of a cell on the selected list row or it might need to know what the name of the current program is. These are just a few examples and there are many more. This post will show how to get values from M3 panels in the most common scenarios.

Continue reading

Custom list templates in M3 Mashups

Support for custom list templates in M3 Mashups was added in Smart Office version 10.0.3. The requirement was to be able to display lists in a more compact way, similar to a card view list. The settings dialog for the M3 ListPanel control now have the option to choose two different List styles called Standard and Template. The Template List style lets you to create a custom list template that defines how the list rows are displayed in the list. Continue reading

Tooltips with MI data in M3 lists

A script requirement we recently heard of was to be able to show tooltips on cells in a M3 list and that the tooltip value should be retrieved using a MI-program. The specific requirement was to get the user name for list columns that contains M3 user IDs. The idea is to use this in M3 lists where the user ID is shown in a column but the user name is not part of the list. Continue reading

Using M3 language constants in JScript

Using M3 language constants in JScript is a requirement that has been received from several sources recently. In Mashups it has been possible to use M3 constants and messages for some time using the markup extension MForms.Mashup.ConstantExtension. JScript developers however have been out of luck and have had to use other means of translating texts in scripts that targets more than one language. Continue reading

Printing from a Mashup

In Smart Office 10.0.4 a new Mashup control was added that adds basic printing supports to Mashups. Before you get too excited it should be noted that this functionality is more like print screen and it does not support pagination or output formatting. The new PrintControl supports printing of parts of the Mashup or the entire Mashup window. The output can be sent to a printer, a print preview window or to a file. Continue reading

Conditional Styles with Dynamic Dates

With conditional styles you can take control over the lists in M3 and S3. Dynamic dates are an important concept when it comes to comparing dates. I’m not the developer who implemented the feature, in fact I have never used it before today. But I understand that this is a topic that quite a few are interested in. In this post I’ll use the requested delivery date on an order and use different styles for if the order has a requested delivery date the coming week or if the requested delivery date is passed. Continue reading

Using JScript and a Mashup to browse for values on M3 panels

The goal of this post is to show how JScript and Mashups can be used to extend the browse functionality in M3. The idea is simple, instead of using the M3 Browse dialog to find a field value on a panel a custom built Mashup is used instead. The Mashup can use M3 panels with Enterprise Search, data services and all the other Mashup controls to improve the browse experience for the user.

The solution consists of two parts, a generic JScript and one or more browse Mashups. The browse Mashup is started using a button or a keyboard shortcut, the user selects something in the Mashup and then one or more values from the Mashup are used to update fields on the panel. The rest of the post will cover a simple browse Mashup and the important parts of the JScript. Continue reading

Validating M3 panels using JScript and MI programs before a request

The scenario for this post is to be able to verify something on a panel in a M3 program before a request is submitted to the M3 BE server. The validation in the example will be made using a MI program that is called asynchronously. The example is not a realistic case but it is easy to test and can be modified and generalized for real business cases. Note that the script is just an example and not intended for production use. Continue reading

Adding a new column in a M3 List

Every now and then we do get questions about manipulating the M3 List. It is possible to add a column using JScript but there is no supported API for the different manipulations. But that does not stop the creative people out there. Now I would like to give you a heads up becuase the list implementation has changed slightly in Lawson Smart Office 10.

You can no longer access the Items property on the listview directly. Continue reading