Quantcast
Channel: Sage X3 – Tips, Tricks and Components
Viewing all articles
Browse latest Browse all 1524

How to filter Local Menu

$
0
0

In X3, we developer may came across with requirement where we need to filter the local menu values for the fields. There are simple techniques available in X3 to filter the local menu values.

Follow the below steps to filter the local menu field records:

  1. The M data type of local menu is non-modifiable however in X3 there is alternate data type is available i.e. MM whose values we can modify at the run time. Therefore use the MM data type for the local menu which you want to filter run time as shown in the below screen shot.
  2. Add Before entry field action on that field.

     LocalMenu13. The GMENLOC global variable can be used to filter the local menu values. We just need to set the GMENLOC(i) variable to 1 to deactivate the local menu values. It will be more preferable to set the values to GMENLOC variable in the Before Entry field action as it gets called before get focus to the field. Refer to the below snippet of code in which for the transmittal type field I have deactivated the 3rd, 4th and 5th value.

LocalMenu2

    4. In the above example for the transmittal field I have deactivated the 3rd, 4th and 5th values and thus it is only showing the first 2 values.

LocalMenu3

Hope this helps!


Viewing all articles
Browse latest Browse all 1524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>