How to check the field null

shibily
Member Posts: 89
Hi,
Any body know how to check the field in a form ( Not table field ) is blank ?
Thanks in advance
Shibily
Any body know how to check the field in a form ( Not table field ) is blank ?
Thanks in advance
Shibily
0
Comments
-
you can use testfields function to check field in code.
eg.
Record.TESTFIELD(Field, [Value])
Customer.TESTFIELD("No.")
u can set it by using property also.
Notblank of text box.
hope it will help u.Experience Makes Man Perfect....
Rajesh Patel0 -
IF YourVAR = '' THEN...There are no bugs - only undocumented features.0
-
if for "field" you mean something in a texbox, it's not correct.
in a textbox you can insert a field value but also a global variable, a function, a sum of these elements (for example)
so, look at the textbox properties, find sourcexpr property and then test the nullity of whatever you have inserted there0 -
rajpatelbca wrote:you can use testfields function to check field in code.
eg.
Record.TESTFIELD(Field, [Value])
Customer.TESTFIELD("No.")
u can set it by using property also.
Notblank of text box.
hope it will help u.
raj
Actually i am using the employee card. I want to validate the Employee.No.. text box0 -
shibily wrote:raj
Actually i am using the employee card. I want to validate the Employee.No.. text box
testfields("No.")
let me know if it not work.Experience Makes Man Perfect....
Rajesh Patel0 -
ok Belias solve this problem.
no problem.Experience Makes Man Perfect....
Rajesh Patel0 -
rajpatelbca wrote:shibily wrote:raj
Actually i am using the employee card. I want to validate the Employee.No.. text box
testfields("No.")
let me know if it not work.
I tried IF TESTFIELD("No.") then
MESSAGE('Enter anything.!!!');
but. i am getting an error message indicating this is a void expression there must be true false expression.0 -
see here is the example of customer you can do this for employee also.
These examples show how to use the TESTFIELD function.
Without Value:
Customer."No." := '';
Customer.TESTFIELD("No.")
This code returns an error message:
You must specify No.in Customer No.=''Experience Makes Man Perfect....
Rajesh Patel0 -
if you are writing like this
if testfields("No.") then
testfield function will not return value thats why it is giving u an error.
it will raise error message if u do not enter value in it.
the second way.
if employee."no."='' then
message('test');
end;
now is it clear ?Experience Makes Man Perfect....
Rajesh Patel0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions