How to populate the fields form?...

Steeve_globetrotter
Member Posts: 46
Hi everybody...
I hope that someone could help me.
Ok, I gonna explain my problem. In fact I have data in the clipboard, I used an OCX for that and it's ok, I can get back the values into a variable in Navision.
My problem is the following :
I would like to copy the content of the variable into a textbox in the form for example...The problem is that I don't know the syntax for this and I can't find this anywhere... ](*,)
CurrForm.<Buy-from Vendor No.> := Clipboard.TextFromClipboard;
I will do a Validate() After in order to keep the automatic fiiling of the others fields.
Help me please...
Thanks a lot to all of you.
I hope that someone could help me.
Ok, I gonna explain my problem. In fact I have data in the clipboard, I used an OCX for that and it's ok, I can get back the values into a variable in Navision.
My problem is the following :
I would like to copy the content of the variable into a textbox in the form for example...The problem is that I don't know the syntax for this and I can't find this anywhere... ](*,)
CurrForm.<Buy-from Vendor No.> := Clipboard.TextFromClipboard;
I will do a Validate() After in order to keep the automatic fiiling of the others fields.
Help me please...
Thanks a lot to all of you.
Steeve Le Provost
http://www.steeve-leprovost.fr.cx
http://www.steeve-leprovost.fr.cx
0
Comments
-
1) You are not assigning the value to some "Edit box"
2) Each edit box has some source expression (variable or field from record)
3) You need to assign the value into this variable or field (if possible through VALIDATE).0 -
kine wrote:1) You are not assigning the value to some "Edit box"
2) Each edit box has some source expression (variable or field from record)
3) You need to assign the value into this variable or field (if possible through VALIDATE).
Hi,
Thanks for your quick answer.
Can you give me an example of how to do that ?
For example, concerning the "DTA Coding Line" in the invoice form (Form 51). If I want to copy directly the content of my global variable in the Edit Box. How can I do that?
Thanks a lot again...Steeve Le Provost
http://www.steeve-leprovost.fr.cx0 -
As Kamil explained, in C/AL you don't assign values to textboxes, it just doesn't work that way. In C/AL you set the variables that are bound to the textbox.
So Let's say you have a form with the buy-from in the header part. I am assuming the Purchase Header table is the sourcetable on the form, and you are working in the C/AL editor on the form itself. You would do simply this:VALIDATE("Buy-from Vendor No.",Clipboard.TextFromClipboard);
This will set the field to the value, and it validates it at the same time. Since the field is the source for the textbox on the form, it should automatically update it. If it doesn't, you need to add a CurrForm.UPDATE after you're done.0 -
DenSter wrote:As Kamil explained, in C/AL you don't assign values to textboxes, it just doesn't work that way. In C/AL you set the variables that are bound to the textbox.
So Let's say you have a form with the buy-from in the header part. I am assuming the Purchase Header table is the sourcetable on the form, and you are working in the C/AL editor on the form itself. You would do simply this:VALIDATE("Buy-from Vendor No.",Clipboard.TextFromClipboard);
This will set the field to the value, and it validates it at the same time. Since the field is the source for the textbox on the form, it should automatically update it. If it doesn't, you need to add a CurrForm.UPDATE after you're done.
Hi and thanks also for your answer...Your solution seems to be great and functional but I have a small problem to test it in fact...
I'm again in the form 51 and I defined automatic "No. Series" for the first field in this form (The first field is "No.") and When you focus on the edit box belox the No. Serie come...This is how it works.
The problem is that I would like to validate directly this first field when I open the form 51 concerning the invoices.
The system in Navision tells me : "You cannot make any change in the database until a transaction has been started" ](*,)
Any idea?
A real big thanks to you, you help me a lot with this
Take careSteeve Le Provost
http://www.steeve-leprovost.fr.cx0
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