Advanced Formatting

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
BLOMASKY
Posts: 1471
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Advanced Formatting

Post by BLOMASKY »

Maybe this is easy, but I would really like the ability to either improve on the Style option or the ability to call a JS function anytime a numeric field needs formatting. This could allow me to zero suppress fields, This could allow me to dynamically control the # of decimal points. Perhaps this could easily be done by making the "format string" more powerful in the styles.

Right now, I have to have 2 fields, the "real" one and a Plain Text field that is always updated with a rule any times the real one changes. Can this be done? Again, this is important enough to me to pay $$$ if I had to.

Bruce
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Advanced Formatting

Post by aware_support »

Not sure if I understand your request correctly, but it sounds like you may need to play with the behaviour of the Kendo UI NumericTextBox widget that Aware IM users to implement numbers. Have you looked at the configuration/methods/events option available? See http://docs.telerik.com/kendo-ui/api/ja ... rictextbox

Configuration/event options can be changed in the Advanced script of the attribute itself, while methods needto be called in the Advanced script of the corresponding form (where you should find the field on the form and call its methods in the "render" script of the form)
Aware IM Support Team
BLOMASKY
Posts: 1471
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Advanced Formatting

Post by BLOMASKY »

Sorry if my request was confusing. Some of the requirements that my customers have, and for both Grids and Queries.

* Be able to ZERO suppress numbers. so anything = 0 prints as blank
* be able to have something else be displayed in a query for a zero. For instance a -- instead
* conditionally format a number, so if an integer it will display with NO decimals, i.e. 1,234 but if decimals display 2, i.e. 1234.50

Can that be done with the config. options? Now I am confused, because in a query, I would need to do something different for each row. But let me read up on the Kendo docs and see if that answers my questions.

Thanks for the response.
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Advanced Formatting

Post by aware_support »

If it's in a query the widget won't help. I guess, you have to use another attribute...
Aware IM Support Team
BLOMASKY
Posts: 1471
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Advanced Formatting

Post by BLOMASKY »

Question. What would be involved in "enhancing" the style option. This seems like it might be the right vehicle. Can easily have a condition.BS.attr = 0

All we need is the style string to be more "flexible"

Bruce
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Advanced Formatting

Post by aware_support »

It should already be supported in styles - including conditional formatting.
Aware IM Support Team
BLOMASKY
Posts: 1471
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Advanced Formatting

Post by BLOMASKY »

Well, I am not smart enough to have styles show a blank for a zero value. I have tried #####. What is the secret please?

Bruce
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: Advanced Formatting

Post by tford »

It should already be supported in styles - including conditional formatting.
Support -- how would you accomplish Bruce's example of:

* Be able to ZERO suppress numbers. so anything = 0 prints as blank
Tom - V8.8 build 3137 - MySql / PostGres
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Advanced Formatting

Post by aware_support »

A little misunderstanding here. No, you cannot suppress zeroes using styles. I thought you meant something else.
Aware IM Support Team
BLOMASKY
Posts: 1471
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Advanced Formatting

Post by BLOMASKY »

Well, then the obvious question, is how hard would it be for you to enable that in future versions. And while we are talking about formatting, many time, I would like to have a unit of measure (for instance since we are so backwards we still use Feet and Inches, so for some quantities, I would like it to say 17' or 65" or 172 LBS. Now, I can accomplish that by having a separate, calculated field with a rule to update it. Maybe this is the best way, but wondering what the effort (cost?) would be to have a function that can take a numeric field (or, better still, have access to the BO that is in context) and then return a string.

This would have to be probably added to the styles form, since it would have to be called whenever the field is displayed. (That is, assuming the USE ATTRIBUTE STYLE is checked.)

Bruce
customaware
Posts: 2400
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Advanced Formatting

Post by customaware »

Bruce,

Alternatively, anywhere you want to display something in Feet and Inches or lbs etc, just insert the following link https://www.nist.gov/document-15694
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Advanced Formatting

Post by aware_support »

Code: Select all

Well, then the obvious question, is how hard would it be for you to enable that in future versions
I assume that the question is about suppressing zeroes only? It shouldn't be hard.

Conversion to inches etc. If you goal is to avoid separate calculated fields then the proper solution is to support "calculated" columns everywhere (or at least in the query). By "calculated columns" I mean columns that are not stored in the database but just calculated "on the fly" using a provided expression and then displayed in the query. This is not easy. Until this is supported you should use calculated attributes available now.
Aware IM Support Team
numberz
Posts: 166
Joined: Sat Aug 05, 2017 12:13 am
Location: New Hampshire - USA

Re: Advanced Formatting

Post by numberz »

tford wrote: Tue Oct 18, 2016 12:56 am
It should already be supported in styles - including conditional formatting.
Support -- how would you accomplish Bruce's example of:

* Be able to ZERO suppress numbers. so anything = 0 prints as blank
So, this was posted about, 4 years ago, so...
Has this question of being able to make a 0.00 appear as blank???
Regards and thanks,
Harry Carter
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Advanced Formatting

Post by aware_support »

There is an option to suppress zeroes in queries.
Aware IM Support Team
Post Reply