creating a multiline textbox and validating it


I am new to forum for NAV. Hope get solution soon.

I want to add a text box(Multiline) which will accept the product detail from the user. the first line will be “product no” which will not be greater then 18 chars and then its description, etc, etc which will not be greater then 32 chars per line.

The problem, am facing is,

1)Cant create a textbox which can accept multiple lines 2) if multiline is possible how to do the above validation.

Please help.


MultiLine property should be Yes

Horizontal align property should be Left

Vertical align property should be top for proper visibilty of the text the use is going to enter

for the text Box… in this case take a variable Productdetails text 50

then onvalidate of the text bod use the following code.

validate(product No,strcopy(productdetails,1,18));

validate( description,strcopy(productdetails,19,50));

but why do u want to display no and description in one text bos can you not use two different field so that you don’t need to do all this code…?



This was, prerviosly done in some program which is now being converted into NAVISION. it was like a textarea in that and when the user click on submit button only first line gets validated if it is >18 then message pops up and for others its 32 chars per line

But multiline property of text box is not working. I am using form where am accepting the product details. Please let me know how i can make multiline property to work.

Thanks for the validation idea. but for tht the multiline property should work.

Yes you can try my solution if it works!

Multiline property is not working. is there any thing else i’ve to do or i’ve forgot?

Best is use two text boxes and ask user to enter data in text box and while populating concatenate and display data to user.

you need to add back slash before the second lien for the navision system to identify so in your case

also make auto enter property to yes for your textbox.

user shoud enter

product ID \ product description

so your validation should consider the back slash also. whcih means first 18 characters are product id then \ (back slash) then 20 to 52 characters is the description


I think it would be best to learn how Nav does it.

instead of converting Nav into how some old product used to do it.

Sounds like you need an Item.“no.” and and item.description field which already exist.

Are you trying to make a simpler entry process?

Previosly it was done in delphi, where the user enter id at firstline and then other details below that.

when the user submits the form the validation happens and if the user enters more then 18 chars in first line or more then 32 chars in other lines the form throws a message

Hi Pritam,

If it is not working then You need to try to convenience the user saying every system can not give similar result /utility as per old system.

I know if it is much difficult to make user understand but you need to try to make it.

Here I am not saying that it is not possible but if it is taking some time to design and develop then it is better to make user understand the problem .

Yes i agree with Amol.

you need make user follow NAVISION protocol now. ask tehm to enter item no and description in the two different fields as navision does always…

that is the way i strongly recommend for long run from the users perspective as well.


Now if you want to do it the normal nav way, there are things you can do.
Like, if you need to stick with 18 characters for example - their is a maxlength property you can set on field.

Thanks anil for your valuable comments. My priority is to meet what client expects, though 100% not possible. but the ideas here are also great. Thank you again

Thank you Mr.Amol. your suggestion is useful not only now but in future too. thanks