Display feet and inches

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Display feet and inches

Post by numberz »

Hi,
I need to be able to enter feet and inches somehow, on a form.
It would allow a user to enter say, 8'-0" or even a prompt asking for the foot 8 then asking for inches 0 etc.
I'd prefer to be able to enter just the numbers as in 8 and 0...then have the display as 8'-0"
And 8'-6" could be entered as 8 then 6?
Or something like that :)
Thank you,
Harry
Regards and thanks,
Harry Carter
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: Display feet and inches

Post by BenHayat »

In my previous app, I needed the user's height. So I had 3 properties
Height feet
Height inches
Total inches. (calculated)

The first two would sit next to each other on the form for entry and the third I used for my internal use.
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Display feet and inches

Post by numberz »

Ben, thanks.
I only need feet and inches.
Can you give me a starting point on how to do this please?
Thank you.
Harry
Regards and thanks,
Harry Carter
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: Display feet and inches

Post by BenHayat »

Then allocate 2 properties one for feet and one for inches ad put them on one row side by side.
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Display feet and inches

Post by numberz »

Ben,
I am about as green as one can get, lol.
I have no idea what to do.
When you state "Allocate two properties" are you meaning "create two attributes"
Regards and thanks,
Harry Carter
customaware
Posts: 2409
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Display feet and inches

Post by customaware »

Convert to the Metric System..

Not helpful I know, but, I couldn't help myself. ;-)
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Display feet and inches

Post by numberz »

Mark,
The USA had decided years ago that we'd be using the Metric system by 1972...about the same time that we were all supposed to be zipping around in jet packs, lol.
Regards,
Harry
Regards and thanks,
Harry Carter
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Display feet and inches

Post by PointsWell »

numberz wrote:Mark,
The USA had decided years ago that we'd be using the Metric system by 1972...about the same time that we were all supposed to be zipping around in jet packs, lol.
Regards,
Harry
Interestingly the USA is a metric country following the Metric act of 1866.

Fun fact - all standard weights and measures in the USA (as in the definitive scientific measure) are metric and then converted to imperial. Which seems like a waste of effort.
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Display feet and inches

Post by numberz »

Can anyone help?
I need to be able to enter a height as shown in attached image. Either that or to enter as just numbers and after I move to next task, entry, etc...have it display as in image.
Thank you.
Harry
Attachments
height.png
height.png (701 Bytes) Viewed 16770 times
Regards and thanks,
Harry Carter
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Display feet and inches

Post by PointsWell »

If the heights were within natural parameters then you could use drop downs; either as a lookup to another BO that can contains other attributes to convert to inches (for ease of calculations elsewhere).

If you are measuring the height of human beings then this is achievable. If you are measuring something with a wide range of heights (e.g. building heights) then you will have a challenge.

Another alternative is to use a text field with an input mask to show the __’__” and then use regex to limit the input options to be only numbers and “ or ‘.

It would require a lot of reformatting to get number to use in calculations.

Probably easiest would be two attributes as mentioned above.

Bo.dimension BO.ft and BO.inch place them close together and then set the tooltip value to be ‘ and “. You can then use anothe4 calculated attribute to show the full value correctly formatted (or calculated column for queries).
Last edited by PointsWell on Mon Jun 11, 2018 3:14 pm, edited 2 times in total.
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Display feet and inches

Post by numberz »

Thank you.
' and " in tooltip looks silly and isn't anywhere close enough.
Do Vladimir and others who own this software frequent this board at all?
Am I the only one in the world of Awareim who needs feet and inches for calculations?
My whole business revolves around this situation.

Regards,
Harry
Regards and thanks,
Harry Carter
johntalbott
Posts: 619
Joined: Wed Jun 17, 2015 11:16 pm
Location: Omaha, Nebraska
Contact:

Re: Display feet and inches

Post by johntalbott »

The suggested ideas are on point.

1. Two separate attributes is the most straightforward approach for calculations.

2. Otherwise you can use an input mask to do something like this ... https://jsfiddle.net/johntalbott/9sampoLw/12/

The trade off with #2 is that you'll have to programmatically split the entered value into feet & inches in order to do calculations.
VocalDay Solutions - Agility - Predictability - Quality

We specialize in enabling business through the innovative use of technology.

AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Display feet and inches

Post by numberz »

John,
I'm in the estimating business.
Feet and inches are very, very common and if I can't get this software to end up with something easily usable and aesthetically pleasing...I just wasted a lot of time and money.
There has to be a better way.
Regards,
Harry
Regards and thanks,
Harry Carter
Jaymer
Posts: 2461
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Display feet and inches

Post by Jaymer »

Harry,
I think the suggestions have been fine.
Even the custom JS John wrote for you works fine.
Besides venting your frustration, you haven't given us [programmers] any idea of what exactly you're trying to do with it after.
WE are trying to think ahead.
People mention "then you'll have it for other calculations", but you don't address that, like its not important.
But you say "I only need feet and inches."

One of my clients is a window manuf. and inches need to be entered like 5/16, 11/32
and it still gets validated and dealt with and used in calcs.
But it wasn't built into the App software they used... they had to make a framework that was going to work throughout the app and then used that everywhere (which really was only 1 entry screen and then it got converted to decimal format for calcs and kept in text format for display)

Whats important to you (inches & feet) for your app isn't important to everyone. I don't need it. Maybe phone validation for others or date arithmetic or financial calcs is key. A lot of great functions are built into aware for those purposes.

Here's an idea.
Google search this: regular expression feet & inches

Take some time to read through those questions asked by other programmers and read the solutions.
SURE, a lot of the answers won't make sense.
But it may give you an appreciation for the issue.
You're not the only one.
Then come back and ask a full question so we know what all need to be considered.

jaymer...
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
PointsWell
Posts: 1460
Joined: Tue Jan 24, 2017 5:51 am
Location: 'Stralya

Re: Display feet and inches

Post by PointsWell »

numberz wrote: ' and " in tooltip looks silly and isn't anywhere close enough.
Then adjust the spacing until they are close enough. And if the notation for feet and inches looks silly then use text abbreviations (ie ft, in)

As Jaymer says you are only specifying a UI problem, you may get better suggestions if you can define the business outcome you are trying to achieve.

As for wasting time and money on Aware -you will not find any tool that magically fixes your challenge. Feet and inches are a non decimal system and computers are driven by deminals and binary.
Post Reply