Left Justify number in the default value of a input popup
Richard Kreiss
rkreiss at gccconsulting.net
Fri Jul 25 08:56:14 PDT 2014
> -----Original Message-----
> From: filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com
> [mailto:filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com] On
> Behalf Of James Flanagan
> Sent: Friday, July 25, 2014 11:27 AM
> To: filePro Mailing List
> Subject: Left Justify number in the default value of a input popup
>
> ::qy(2,.0):
> ::qt(2,LJ):
> ::nq(2,LJ):
> ::qy="1":
> ::qt=qy:
> ::msgbox qt:
> chg_qty::input popup nq "Enter the new quantity^A " default qt:
>
>
> I am trying to left justify a number in the default value of an input popup, but
> nothing I have tried has been successful. in the above code, when qt is shown
> in the msgbox, it is left justified. however, in the input popup, it is right
> justified.
>
> My motivation for this is because we have already had an instance where a
> user when trying to change the qty 1 to qty 2, accidentally changed the qty to
> 21. it is my assumption that this would be best avoided by having the first
> number you type overwrite the existing default value. Thank you very much
> in advance
>
>
> Filepro 5.7.0
> FreeBSD 9.2
James,
I would suggest a different approach to this problem.
Set your input box to
If: qt = ""
Then: input popup nq "Enter Quantity Wanted "
If: gt ge "1"
Then: input popup ng "Enter a new quantity or\nPress Enter for"<qt<" "
Yn_qtyIf: nq ge "1"
Then: input popup y "Change Quantity from \r"<qt<"\r To "<nq{"\n(Y)es or (N)o -> "
If : y = ""
Then:beep;GOTO yn_qty
If y = "Y"
Then: qt=nq;display;END
If: y = "N"
Then: 'whatever action you want
A bit more programming but if a new quantity is entered, the user has to confirm it. This should reduce errors.
Another thought, declare a long variable OriginalQuantity to hold the original quantity in case the quantity was changed in error and the old original quantity need to be re-entered.
In some of my applications I have had a field for the original quantity ordered as well as a quantity field. This allowed management to see if there were changes to the quantity ordered as the original order quantity was always there and there was no access to this field on the order had been saved.
Just a suggestion as to how you can handle this.
Richard Kreiss
GCC Consulting
Office: 410-653-2813
More information about the Filepro-list
mailing list