Command Button Question
paullynch
Member Posts: 27
I want to add a command button (actually a series of command buttons) to a form that will increment/add to an 'amount' field by a pre-defined value each time it is pushed. eg. amount field currently set at 0. push the "50" button and amount field changes to 50.00, then push the "20" button and the amount field changes to 80.00.
Can anyone suggest a neat solution to this problem.
Thanks
Paul
Can anyone suggest a neat solution to this problem.
Thanks
Paul
0
Answers
-
just in case my appalling arithmetic confuses anyone... if the 50 button is pressed, then the 20 button, the amount field should read 70.00, i.e. 50+20=70, not 80. sorry.0
-
you want each button 10 - 20 - 50 - etc to leep adding to the same field correct?
Is this an amout filed where where a "line no" will be involved? aka sales line?
You'll need some setfilters else,
if it's just some field on the item card for example - you'll need to add code to the command button ONPUSH trigger like
(50 button)
Amount := amount + 50;
modify;
(20 button)
Amount := amount + 20;
modify;0 -
yes correct
and no there is no line number, it should just populate a variable amount field (call it "tender")0 -
i edited the post above before you submitted your response
is it a variable on the form or a field in a table?0 -
great thanks - sorted!0
-
here's a sample

http://www.youtube.com/watch?v=Rlv-3eaGsBs
Note: you can call up MS Calculator from a form real easy tho.
Add a command Button
Caption: Get Calculator
PushAction:RunSystem
RunCommand:calc.exe
Save->Compile->Enjoy0 -
neat job, thanks again!
if you're short of a challenge, see if you can fix my keypad problem, on the same form to be able to enter the amount only using buttons
0 -
note sure I understand the problem - is this related to the touchscreen post?
Step 1 : get a touchscreen
Step2 : Read Kriki's example
You need an on form calculator?
Something similar to the Date Formula Calculator?
http://www.mibuso.com/dlinfo.asp?FileID=514
but with just numbers? You can probably modify this form.
But you'll need to calc a mathimatic expression.
viewtopic.php?f=23&t=14820
Put them together & you should have a calculator [-o<0 -
yes it's related to the touchscreen post - but the touchscreen itself is largely irrelevant - it would be the same with just a mouse click
what i want is to have keypad buttons on a form that the user can click/touch to enter an amount so that it replaces the keyboard
eg. press button "1" -> press button "5" -> press button "." -> press button "9"
amount field should then show 15.900 -
I guess you caught me in a good mood today!
You mean like this?
http://www.youtube.com/watch?v=ThPKg549nHo
Import the txt file to play with it.
https://docs.google.com/document/edit?i ... azE&hl=en#
Props to Andy Sandefer who's Date Formula Calculator was the roadmap.0 -
you're a legend - thanks - i owe you a pint!
I was going down the same path as you with the date formula add on but didn't quite get there0 -
As an example at the end on press of enter the string is EVALUTE(D) into a sample variable
EVALUATE(EnterAmount,EnterString);
The EnterAmount (Decimal) can be switched out to the field you need it in.
Good Luck!0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions