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

Re: Display feet and inches

Post by numberz »

Pointswell, thanks.
I thought I was clear, sorry.
When a person enters a height of a wall, in feet and inches, it needs to be sensible looking.
In one job we're entering this type of info, many times.
How about this....
Is it possible to enter a height of say 806 and have the application convert it to 8'-6" ?
Or 1006 and after entry, change it to 10'-6" ?
And of course it would be possible to display the height as 8'-6" also?
Regards and thanks,
Harry Carter
Last edited by numberz on Mon Jun 11, 2018 7:35 pm, edited 1 time in total.
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 »

If your first concern is data entry / UI look & feel, try this ...

Enter the below as a custom input mask for your Height attribute.

Code: Select all

"90'90\""
As written, this will provide you with a textbox with a mask of : __'__"

It will handle: Up to 2 digits followed by ' and Up to 2 digits followed by".

The 9 placeholder will allow entry of a space or a digit. The 0 placeholder will allow entry of a digit.

Examples:
Enter 0806 and you get 08'06"
Enter space 8 space 6 .. and you get 8' 6"

Note: The input mask can be adjusted to fit whatever you think is most appropriate. There is an input mask "cheat sheet" below the custom in put mask settings.

If you need something more advanced, email me. I can make it do whatever you want.
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 »

[quote="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."

Jaymer, with respect...what you feel is fine may nor be fine to others. I have been in my industry for over 40 years. My father created one of the world's first construction estimating programs for the PC. I am not slouch or stranger to data entry on MANY types of software. I know what I need and want and if it's POSSIBLE to do it, then it will be done. Now, I respect all help that comes my way but it doesn't mean that the help is the correct fit for what I want and need and can have. I can assure you that I am not venting but rather being very clear on the fact. I didn't ask anyone to write a solution I was just tossing questions out there, hoping that my situation had been encountered previously and that a solution to my need and want, existed. The reply "I only need feet and inches" was a direct answer to a question that Ben had asked, nothing else. I also never entertained the idea that what's important to me would be important to others...at all.

I do know that other software has methods that are superior to what has been suggested and THAT is why I want what is best. I hope that is understandable.

Is it possible to enter a wall height in numbers, say, 1006 and have it change to 10'-06" when the Enter key is pressed?

I thoroughly appreciate each and every attempt at helping me through this problem. I take a look at AwareIM and think "If this application can do all of this then CERTAINLY there is a solution for me" I feel that AwareIM is a brilliant creation.
Regards and thanks,
Harry
Regards and thanks,
Harry Carter
Jaymer
Posts: 2454
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Display feet and inches

Post by Jaymer »

PointsWell wrote:
numberz wrote: 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.
For example, looking through the Google search results, there's a different way to code it if its measuring height of a human being. (You only have 3-7 feet, for example.)
And if you only need inches, is that whole inches or fractions too (ie. 11' 5.5")?

So telling us (who are willing to help you) more about the whole picture is best.
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
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Display feet and inches

Post by numberz »

One of the reasons why I need to be able to simply enter a height in ONE box is because I sometimes need or want to edit heights when they are displayed. So if I see a height displayed as 10'-6" in a field or cell, etc., I need to be able to click and type over, for inline edit. I need to be able to type the feet and inches as numbers and have it change to the displayed version when I hit the Enter key. So, 900 would change to 9'-0" , 803 would show as 8'-3", and so on.

So, a quick scenario. I have a wall that needs plywood covering. I measure the linear feet of the wall and also need a height so that I can arrive at the square foot total of plywood. So in this instance I would need a length and height.
Length
Height
Yes, I see that numerous applications use either a 2 box input (feet and inches) system and yes, I could probably live with that but as I said I have a lot of instances where I would have to inline edit. I SUPPOSE I could disallow inline editing and force user to click the Edit button but good, modern applications allow for inline editing, no? So...if inline editing is allowed, I'd definitely need some solution that allows for direct typing in ONE box...because the height displayed would be the result from the rules that combined the two boxes of feet and inches.

Of course I realize that behind the scenes we're using decimals when calculating.
Can this be done and/or is there a better way? My concern is that I need to edit inline and being USA style, I realize that it complicates things.

Oh...and my heights could be any height, meaning that no limitations. can be on heights. Very different from a human height that as you said is obviously limited. I may have a facade that is 200' tall.
Thank you.
Regards and thanks,
Harry Carter
Jaymer
Posts: 2454
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Display feet and inches

Post by Jaymer »

right away I have an issue with your example 900
How do I know its not 90ft, 0 inches?
would that be 9000?
are inches always the last 2 digits
9011 is 90 ft, 11 in?

and no fractions, so no 90115 or 9011.5?

200 ft
so thats 2005 for 200ft, 5 in?
prolly 20005 using inches as the right 2

what about entering
9.5 9 ft 5 in
10.3 10 ft 3 in
15.11 15 ft 11 in
200.10 200 ft 10 in

I'm not sure you'd have a consensus on the Forum that INLINE EDITING is the way to go, or something you can rely on.
I have used it, but I know some are really opposed to it as being flaky/unpredictable.

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
johntalbott
Posts: 619
Joined: Wed Jun 17, 2015 11:16 pm
Location: Omaha, Nebraska
Contact:

Re: Display feet and inches

Post by johntalbott »

Well this is fun.

Did you try the custom input mask that I provided? What about it is problematic?
I need to be able to type the feet and inches as numbers and have it change to the displayed version when I hit the Enter key. So, 900 would change to 9'-0" , 803 would show as 8'-3", and so on.
As I mentioned, I can make it do pretty much anything you want it to do ... although this will get complicated in a hurry for the reasons Jaymer mentioned in his last post. If some version of an input mask will not work, something like 9.0 or 8.3 is cleaner and more user friendly.
Yes, I see that numerous applications use either a 2 box input (feet and inches) system and yes, I could probably live with that but as I said I have a lot of instances where I would have to inline edit. I SUPPOSE I could disallow inline editing and force user to click the Edit button but good, modern applications allow for inline editing, no?
You mention inline editing here. Are you entering the data in a grid? This is new and important information.
I do know that other software has methods that are superior to what has been suggested and THAT is why I want what is best.
What software development tool/platform will handle this scenario without custom programming? What made you decide to not use it?
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 »

Jaymer wrote:right away I have an issue with your example 900
How do I know its not 90ft, 0 inches?
would that be 9000?
are inches always the last 2 digits
9011 is 90 ft, 11 in?

and no fractions, so no 90115 or 9011.5?

200 ft
so thats 2005 for 200ft, 5 in?
prolly 20005 using inches as the right 2

what about entering
9.5 9 ft 5 in
10.3 10 ft 3 in
15.11 15 ft 11 in
200.10 200 ft 10 in

I'm not sure you'd have a consensus on the Forum that INLINE EDITING is the way to go, or something you can rely on.
I have used it, but I know some are really opposed to it as being flaky/unpredictable.

jaymer...
There is a software out there that uses similar idea of what I need in terms of doing this. The idea is that they use 4 numbers, the first two (except less than 10 feet) always signify feet and the next two always signify inches.
9 feet would be 900. No leading zero needed for any height less than 10 feet...BUT 0900 CAN be used if desired.
10 feet would be 1000
10 feet six inches would be 1006
8 feet 4 inches would be 804

But what happens AFTER the above numbers are entered is...the viewed result would be 10'-0", 10'-6", 8'-4". I realize this is because of non metric people...but it is the way things are here.
Could I buck the system and use say, 10.5 for 10'-6"? Wouldn't fly here. Too many users that would never switch.

This system has been used for 30 years.
Their inline editing works very well and is never incorrect...have no idea how it could be.

Certainly I can't use a method that is more redundant or takes more hoops to jump through in order to achieve same result.
Regards and thanks,
Harry Carter
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Display feet and inches

Post by numberz »

johntalbott wrote:Well this is fun.

Did you try the custom input mask that I provided? What about it is problematic?

Harry Said: Not yet. I have to wrap my head around it because I purchased AwareIM 7 or 8 months ago and this is the extent of my non-programming skills.
I need to be able to type the feet and inches as numbers and have it change to the displayed version when I hit the Enter key. So, 900 would change to 9'-0" , 803 would show as 8'-3", and so on.
As I mentioned, I can make it do pretty much anything you want it to do ... although this will get complicated in a hurry for the reasons Jaymer mentioned in his last post. If some version of an input mask will not work, something like 9.0 or 8.3 is cleaner and more user friendly.

Harry Said: Won't fly with construction companies here.
Yes, I see that numerous applications use either a 2 box input (feet and inches) system and yes, I could probably live with that but as I said I have a lot of instances where I would have to inline edit. I SUPPOSE I could disallow inline editing and force user to click the Edit button but good, modern applications allow for inline editing, no?
You mention inline editing here. Are you entering the data in a grid? This is new and important information.

Harry Said: No, just displaying in a grid. But once grid is viewed, things sometimes need to be changed and other software that are similar allow for editing without opening up the form that was used to create.
I do know that other software has methods that are superior to what has been suggested and THAT is why I want what is best.
What software development tool/platform will handle this scenario without custom programming? What made you decide to not use it?
Harry Said: I am not a programmer. I am a construction estimator/instructor. I know very little about programming. I saw the ads for AwareIm, did my homework and decided to give it a shot. I learned form the ground up with the help of a very good man, Mark. He told me that I could get this done and he is correct. I have learned quite a lot but this is something that stops the show if I can't get past it...I just need to know if Awareim has the ummph and capabilities to be able to accomplish what is already a daily routine (and has been for many years) in much of the construction world of USA.
Last edited by numberz on Tue Jun 12, 2018 12:39 am, edited 1 time in total.
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: I just need to know if Awareim has the ummph and capabilities to be able to accomplish what is already a daily routine (and has been for many years) in much of the construction world of USA.
There are many ways to achieve what you are looking for and John has suggested options.

AIM is expremely powerful and extremely capable so it is not a matter of oomph it is a matter of complexity. Just because someone else has achieved this in another programming language it does not mean that it was a simple two click to achieve. That does not mean that AIM is deficient.

Any operation that is trying to achieve what you want will involve multiple steps and will require more than a simple solution.

As John and Jaymer have said you could create a text field with either an input mask or regex validation. For those numbers to then be useful to your system you will need to do some pattern matching to strip everything before the ‘ to be feet and everything after to be inches. You will then need to do validation on the second number to make sure that it is less than 12. If you are wanting the - to signify a number less than 12 you may need to use a display field, or you could use a business rule on the field

If you want it put in as 809 then your rule will need to count back the last two characters and do your substitution to convert it to 8’-9”.
It will become a bit cumbersome after a while. You could pass it all off to a process and restructure it there if you need to use it multiple places.

You will then probably need to be able to determine if the last two digits are more than 12; do you calculate that as x ft and modulo inches.

There are a few solutions provided here, are they perfect, probably not, but whatever your competitor application is I will bet you that it did not get solved in 5 minutes either.

Imperial measures are a pita and while being a pain doesn’t mean that you can ignore it as obviously your industry is deeply dependent on it, it does mean that the solution to your challenge is going to be less straightforward than a currency calculation or a metric calculation.
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Display feet and inches

Post by numberz »

Pointswell, thanks.

Pointswell said: You will then probably need to be able to determine if the last two digits are more than 12; do you calculate that as x ft and modulo inches.
Harry said: Inches would be 0 through 11. You can't have 5'-12" as that would be 6'-0" There are 12 inches in a foot.

Pointswell said: If you are wanting the - to signify a number less than 12 you may need to use a display field, or you could use a business rule on the field
Harry Said: The - has no function except to be a visual separator.
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: Harry said: Inches would be 0 through 11. You can't have 5'-12" as that would be 6'-0" There are 12 inches in a foot.
Dude, you seem more interested in pointing out the flaws with anything that anyone gives you - obviously I know how feet and inches are calculated I’m trying to help you out with options.

John Jay and I have given you a few pointers hope one of them works for you.
Jaymer
Posts: 2454
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Display feet and inches

Post by Jaymer »

ok, i've spent more time on this than i want.

using 2 fields, a simple RULE updates the Display field - rule being DYNAMIC and DO NOT EXECUTE ON SERVER
updates when you TAB out of the Size field.
Screen Shot 2018-06-11 at 9.02.22 PM.png
Screen Shot 2018-06-11 at 9.02.22 PM.png (9.19 KiB) Viewed 15296 times
HOWEVER, you'll see it appears that I'm not doing it correctly, as there is NOT a double quote at the end... or IS THERE?
I think there's a bug in the grid.
Seeing the rec in the FORM and its correct:
Screen Shot 2018-06-11 at 9.03.12 PM.png
Screen Shot 2018-06-11 at 9.03.12 PM.png (6.91 KiB) Viewed 15296 times
OK, so then you really don't need a 2nd field, so lets update the Size field with itself. here's the Rule.
StaffMember.Size=CHARS_FROM_LEFT(StaffMember.Size,2)+`'-`+CHARS_FROM_RIGHT(StaffMember.Size,2)+SystemSettings.DQ

BUT, you have to have a starting 0, and really need to accomodate feet greater than 99.
And you'd need to strip off the leading 0 on inches when its 0-9 - I didn't want to take the time.

Really, this is a simple logic issue and text manipulation exercise - doable in ANY language on the planet.
Its not an Aware issue.
However, due to quirkiness of the INLINE editing, Size won't update for me when I leave the field - only when you go to next record - so that sucks.
When it was 2 fields, it immediately updated the SizeDisp field when I left Size.

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
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Display feet and inches

Post by numberz »

PointsWell wrote:
numberz wrote: Harry said: Inches would be 0 through 11. You can't have 5'-12" as that would be 6'-0" There are 12 inches in a foot.
Dude, you seem more interested in pointing out the flaws with anything that anyone gives you - obviously I know how feet and inches are calculated I’m trying to help you out with options.

John Jay and I have given you a few pointers hope one of them works for you.
Pointwell,
I meant absolutely no disrespect nor was I trying to be funny. From your words it seemed that you didn't understand what I stated so I explained further. I am not pointing out flaws with anyone or anything. I am merely trying to fill you in on what I can't use. I can understand that you may feel frustrated at the idea of me not embracing what you propose but jeez, you're still trying to understand my needs here...how could you possibly decide what was good for my needs? I understand if you can't solve this problem and of course, if this is causing you grief then by all means, don't let that happen. I still will proceed because I need the right solution. Thanks greatly for trying, I do appreciate it.
Regards,
Harry
Last edited by numberz on Tue Jun 12, 2018 1:48 am, edited 1 time in total.
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 »

If you always treat the last two digits as "whole" inches, meaning no fractions, it seems that you can achieve what you want with custom code and/or possibly custom rules to convert the entered value to the displayed value.

2'-6" is entered as 206
20'-6" is entered as 2006
200'-6" is entered as 20006
2000'-6" is entered as 200006

The addition of an input mask will lead to a much more elegant and less error prone solution.
They are designed to address scenarios such as this.

I assume that you'll also want to limit inches portion of the value to less than or equal to 11. This will require custom code and/or rules.

The reason you frequently see the usage of a separate fields for Feet and Inches is that it's much more straightforward and doesn't require nearly as much effort.
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
Post Reply