NoBlank Property in Table or Page not working NAV 2013

bsfartiyalbsfartiyal Member Posts: 110
edited 2013-02-23 in NAV Three Tier
I have mark No-blank property YES in sales order and line table also mark in Page sales order but user able to create without any data where I mark the no-blank property YES.

It's mean in table and page property not working in Navision in case of No-Blank filed.

I don't want more coding for control the feature.

any solution please help.

Regards

B.S.Fartiyal

Comments

  • BeliasBelias Member Posts: 2,998
    and what if you try to insert a blank value in the field marked as noblank? Does nav returns an error?
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • bsturzobsturzo Member, Microsoft Employee Posts: 29
    Hello,

    I am testing this on NAV 2013 and seems to work:
    1. Go to Sales Header table.
    2. Set NotBlank = Yes on "Bill to Name" field.
    3. Open Sales Order page and create a new one.
    4. Sell-to Customer No = 10000.
    5. Go to Bill To Customer Name on Invoice tab.
    6. Blank it out.

    Actual result: Error, "Bill-to Name must be filled in.".

    Could this be something specific to your customized database?
    Which field are you setting NotBlank on?

    Thanks,
    Bogdan
  • MBergerMBerger Member Posts: 413
    The problem with "noblank" is that is will ONLY work when the field has the focus. If you never put the cursor in the field, it will not work at all.
  • SavatageSavatage Member Posts: 7,142
    Sounds like he wants more of a Mandatory field.

    He also says he doesn't want any additional coding which is what would be required.

    Fields that we absolutely need filled in on sales orders, we've added code on release of the order to check those fields for values else error.
  • bsfartiyalbsfartiyal Member Posts: 110
    Savatage wrote:
    Sounds like he wants more of a Mandatory field.

    He also says he doesn't want any additional coding which is what would be required.

    Fields that we absolutely need filled in on sales orders, we've added code on release of the order to check those fields for values else error.


    in sales order header table, if we set NoBlank any filed, when ever we go next record either insert or modify it must be raise the error when field if blank, otherwise no meaning of Noblank property. because user has insert the record or modify the record but not release or post, when he will get the error, if other user will release or post the record he does not know what will fill in blank field .

    If any functionality or marking mandatory of data in field kindly suggest.

    regards

    b.S.Fartiyal
  • bsfartiyalbsfartiyal Member Posts: 110
    What is the datatype of field?

    not related to data type, any data type expect boolen,

    Noblank property is set for field not for data type.

    kindly help.
    regards

    B.S.Fartiyal
  • bsfartiyalbsfartiyal Member Posts: 110
    Belias wrote:
    and what if you try to insert a blank value in the field marked as noblank? Does nav returns an error?

    user will insert the sales order but I have mark the some important field mark as Noblank but user will insert next record without any error.

    we need some field mandatory data also don't want more coding, need the table and field level control not through coding.

    any help please

    regards
    B.S.Fartiyal
  • bsfartiyalbsfartiyal Member Posts: 110
    bsturzo wrote:
    Hello,

    I am testing this on NAV 2013 and seems to work:
    1. Go to Sales Header table.
    2. Set NotBlank = Yes on "Bill to Name" field.
    3. Open Sales Order page and create a new one.
    4. Sell-to Customer No = 10000.
    5. Go to Bill To Customer Name on Invoice tab.
    6. Blank it out.

    Actual result: Error, "Bill-to Name must be filled in.".

    Could this be something specific to your customized database?
    Which field are you setting NotBlank on?

    Thanks,
    Bogdan

    its correct but user avoid the data entry some mandatory field and go ahead without entry the data on some field , how we control the user. when the cursor focus on field and mark no blank if move the cursor without entry of data it will raise error.

    My focus on if we mark the no blank any field and user avoid the data entry he will can't go ahead without entry of no blank field. any control is there without coding.

    when the Noblank property function will work release , post, user are when aware these field which are we mark no blank or data mandatory.

    any help suggestion pl.

    regards

    B. S.Fartiyal
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    bsfartiyal wrote:
    What is the datatype of field?

    not related to data type, any data type expect boolen,

    Noblank property is set for field not for data type.

    If you read my question carefully you will understand that I have mentioned field only.

    There can be a chance "NotBlank" is not working for particular datatype.
    I have seen this behaviour with "Numeric" Property and reported here
    https://connect.microsoft.com/dynamicssuggestions/feedback/details/727906/numeric-property-is-not-working-on-code-type-fields-in-pages

    You cannot achieve your requirement with "NotBlank". You need to write code.
  • SavatageSavatage Member Posts: 7,142
    as above Not blank works if a user enters a value into that field and then tries to clear it.
    it doesn't prevent a user from passing over that field.

    We've also added a default value to InitValue property so at least it would have something there.

    that's where coding comes in to check those fields using some kind of function.

    viewtopic.php?f=5&t=56195
  • bsfartiyalbsfartiyal Member Posts: 110
    bsfartiyal wrote:
    What is the datatype of field?

    not related to data type, any data type expect boolen,

    Noblank property is set for field not for data type.

    If you read my question carefully you will understand that I have mentioned field only.

    There can be a chance "NotBlank" is not working for particular datatype.
    I have seen this behaviour with "Numeric" Property and reported here
    https://connect.microsoft.com/dynamicssuggestions/feedback/details/727906/numeric-property-is-not-working-on-code-type-fields-in-pages

    You cannot achieve your requirement with "NotBlank". You need to write code.


    Overall , what is the role for NoBlank Property and when it will work in a table and page or Form ???????
  • bsfartiyalbsfartiyal Member Posts: 110
    Savatage wrote:
    as above Not blank works if a user enters a value into that field and then tries to clear it.
    it doesn't prevent a user from passing over that field.

    We've also added a default value to InitValue property so at least it would have something there.

    that's where coding comes in to check those fields using some kind of function.

    http://www.mibuso.com/forum/viewtopic.php?f=5&t=56195

    Over all what is role of NoBlank property and when it will work in a table , page , and a from ???

    Regards

    B.S.Fartiyal
  • SavatageSavatage Member Posts: 7,142
    I'm not sure what else is to say.

    It only works if the field gets validated. so an entry has to be made in that field in order for it to work. If the user never makes an entry in the field where notblank has been set then no validation takes place and nothing furthermore happens.

    http://msdn.microsoft.com/en-us/library/dd301349(v=nav.70).aspx
  • bsfartiyalbsfartiyal Member Posts: 110
    Savatage wrote:
    I'm not sure what else is to say.

    It only works if the field gets validated. so an entry has to be made in that field in order for it to work. If the user never makes an entry in the field where notblank has been set then no validation takes place and nothing furthermore happens.

    http://msdn.microsoft.com/en-us/library/dd301349(v=nav.70).aspx

    Pl must be understand , we don't want more coding customization in Navision, I am giving an example, and suggest what we will do, and how to control.

    we can't bound customer to a location, one customer billing can be more location. when a user creating a sales order , he has complete the sales but not select the location and not release and post he send the approval.

    we already mark the location as mandatory as NoBlank. but user skip the field. location still blank when approver has approve the sales order and release the Sales order then he has get error message location must be filled, he will fired the data entry operator, and data entry operator blame to development he not mark mandatory.

    there are no of table , if we customized each and every field mandatory as per requirement how much customization is required. pl estimate...!

    regards

    B.S.Fartiyal
  • SavatageSavatage Member Posts: 7,142
    Does the data entry operator also blame hs car if runs out of gas beacuse he didn't fill it? No.
    There are some things that he must do. So if filling in the location code is necessary then that's on him to do so. Now if you want to idiot proof your system some codeing is required.

    I suggest you contact your developer to add TESTFIELDS on release of the order to check all the field that must be entered. It's not that big of a deal. unless you don't update the order status?

    see here how we did it for customers. The same can be done on release of the order.
    viewtopic.php?f=5&t=56195
    (Scroll to the 2nd post)
  • bsturzobsturzo Member, Microsoft Employee Posts: 29
    Hi,

    Harry is correct. When the field is not part of the primary key, NotBlank does not prohibit inserting a new record if the field is blank.
    It only throws an error if you are focusing on the field when it's blank.

    Since there is not Mandatory property for a field, you'll need to write code for it. (unless you want to add all your fields to the primary key :) )


    Thanks,
    Bogdan
  • bsfartiyalbsfartiyal Member Posts: 110
    bsturzo wrote:
    Hi,

    Harry is correct. When the field is not part of the primary key, NotBlank does not prohibit inserting a new record if the field is blank.
    It only throws an error if you are focusing on the field when it's blank.

    Since there is not Mandatory property for a field, you'll need to write code for it. (unless you want to add all your fields to the primary key :) )


    Thanks,
    Bogdan


    its mean we will customize all field which we need mandatory , can u estimated how much customization work ???
    regards

    B.S.Fartiyal
  • bsturzobsturzo Member, Microsoft Employee Posts: 29
    Hi,

    you will need to add TESTFIELD verifications on OnInsert for the fields you want mandatory - this seems to be the quickest fix.
    The amount of time needed depends, of course, on the number of tables where you need that and the skill of the developers.

    Thanks,
    Bogdan
  • SavatageSavatage Member Posts: 7,142
    Tell your nav partner what you would like to have done and they will write you a quote.

    Then based on that number you can decide if you would like to proceed with the modification.
  • bsfartiyalbsfartiyal Member Posts: 110
    Savatage wrote:
    Tell your nav partner what you would like to have done and they will write you a quote.

    Then based on that number you can decide if you would like to proceed with the modification.


    why not Microsoft will improve this functionality , when ever a user on page, Form, and table and move next or previous or any other work it must check all field property what we set.

    this will lot of time saving in development.

    what you think ???
    regards
  • bsturzobsturzo Member, Microsoft Employee Posts: 29
    Hi,
    I'll pass on your requirement to the relevant parties. Keep in mind, though, this does not guarantee it will be picked up for the next version of NAV :)

    Thanks,
    Bogdan
Sign In or Register to comment.