<img src="https://secure.leadforensics.com/133892.png" alt="" style="display:none;">

In previous blog posts I have described features in the new list standard. The new list standard is a gold mine of good features, don´t forget about it! All programs listed in CMS005 have the new standard, and today I am going to describe how to create your own virtual field for a date comparison. (The new list standard is available from 13.2 and onwards).

When you have a list of purchase orders (PPS220 in this case) you can create personalizations to highlight the late order lines, but if you only see the delivery date, it is hard to quickly figure out how late an order line really is.

In the example below I have created a virtual field that shows the number of days an order is late. To the field I have added a personalization that highlights the number of days late with red when the order is delayed, and adds a grey background if the order is more than 50 days late.

12_PPS220_View.png

Virtual fields really helps the users to see data in an easier way, and they are not difficult to configure. So let’s start making a field that shows number of days late!

We will start from CMS005, and in the example we are using the program purchase order lines, PPS220.

12_CMS005_1.png

Option 12 takes us to the virtual fields.

To be able to show number of days late I need three virtual fields. First I need to find the day number for the requested delivery date, then I need to find the day number for today’s date, and at last I need to calculate the difference.

To get the day number for requested delivery date I create a field called &DWDT. The field type should be 7 - Date, and it is a numeric field. I want the base date to be based on an object, in this case IBDWDT (delivery date) and the date output is 2 – Day number.

12_DWDT.png

To get the day number for today’s date, I create a field called &TODA. This field is also of type 7 – Date, but the base date is set to current date.

12_Today.png

The last step is to create the field that will show number of days late, &LATE. This field is of type 1-Calculation. Since you need to have the day numbers before you can do the calculation, I need to use the calculation sequence, highlighted in yellow below.

The calculation is easy in this case, we just calculate the difference between requested delivery date (&DWDT) and todays date (&TODA).

12_LATE.png

When the fields are ready, I will add the new field to the view in PPS220, and once that is done I can see the number of days late!

12_View.png

Discuss this post

Recommended posts

Sometimes you need a simple way of following changes of values for certain fields in M3. By using the event log in M3 you have a handy solution 😊 Follow the steps below and you will have a log of changed values for supplier bank accounts in just a few minutes!
In this blog post I describe how to get your item names in the language connected to the user when using custom lists in Infor M3.
If you are running Infor OS/H5 you have the possibility to create really nice homepages for your users. The homepages are the starting points for all roles, and one of the widgets you probably want to have on your homepage is the menu-widget. On the menu widget you can add links to M3 programs for example, but by using bookmarks you can make the links smart, and let them open the programs with predefined selections and searches.
In this blog post I'm describing how to create bookmarks in M3. Since we are moving towards Infor OS and H5, we need to handle that there are some differences in how you manage bookmarks in the different user interfaces for M3.
In Infor M3 13.4 there is a new possibility, you can build your own list program. This blog post will show you how to do that.
right-arrow share search phone phone-filled menu filter envelope envelope-filled close checkmark caret-down arrow-up arrow-right arrow-left arrow-down