Input Mask in Navision

FlashtnFlashtn Member Posts: 68
edited 2004-10-15 in Navision Attain
Hi all,

How can I create an input mask in Navision ? Can I use Format propriety for a field in a form ?

Thanks in advance.

Comments

  • csimoneauxcsimoneaux Member Posts: 168
    Would you provide a little more detail? Is this a new field you created, an existing field? What do you wish to use masking for?
  • DraqosDraqos Member Posts: 36
    Youd could use something like this:
    Record.FILTERGROUP(1);
    Record.SETFILTER(fieldToBeMasked, filterMask);
    Record.FILTERGROUP(0);

    It is quite restrictive, though... Depends on what you're trying to mask.
    "Simplicity is the ultimate sophistication."
    Leonardo DaVinci
  • FlashtnFlashtn Member Posts: 68
    I would musk the serial number of items. Because of item variety in our inventoru, there is many formats for serial numbers. So, I would oblige each user to enter the right serial numbers.
  • DraqosDraqos Member Posts: 36
    1. Declare Tmp -> Local TEMPORARY Record variable. same type as Rec
    2. Add this code to the following table triggers:
    On Insert & On Modify
    Tmp := Rec;
    Tmp.FILTERGROUP(1);
    Tmp.SETFILTER(Code, '??'); //allows only 2 chars in "Code" field
    Tmp.FILTERGROUP(0);
    Tmp.INSERT;
    IF Tmp.COUNT = 0 THEN ERROR ('insert correct format');
    
    "Simplicity is the ultimate sophistication."
    Leonardo DaVinci
  • DraqosDraqos Member Posts: 36
    IF the field is not within the primary key, add that code to the OnValidate FIELD OR OnModify TABLE.
    For primary key field: OnInsert & OnRename
    "Simplicity is the ultimate sophistication."
    Leonardo DaVinci
Sign In or Register to comment.