VisualNeo Web Newbie Question Regarding neoTable Features - Forum

Forum Navigation
You need to log in to create posts and topics.

VisualNeo Web Newbie Question Regarding neoTable Features

I am new to VisualNeo. Although I purchased VisualNeo Web a couple of years ago, I am now trying to create my first app. My intentions are to use the web product to build mobile database apps. I looked at other products. but I kept coming back to this one because it seems much more robust in creating web/mobile apps and is priced right for the small developer. I like the scripting features. Other development products are ridiculously priced and requires subscriptions and are cloud based with lots of restrictions. I appreciate the developers creating a product that we can maintain and use on our own computers. I do plan to use CloudNeo for my database apps for closed users, not the public.

Having said all this, I am trying to create my first database app. View only, no updates in this app. I've gone through the help system, the forum, tutorials and sample apps. I have a sqlite database. I can display records using neoTable features. It takes a little getting used to the little nuances but I am getting through it. Once you learn it, it's pretty much the same for all tables. What I am struggling with is formatting columns in the table. Dates are stored in the database as "yyyy-mm-dd", but I want to display it in the table column as "mm-dd-yyyy". I see where there is a place to identify a subroutine in the "neoTableSetColumn" action to do formatting, but I don't know what the code should be to format the date. I've researched and see where dates are talked about. I just don't know what commands to use. Everything I've tried has failed. Also, I need to format numbers to currency format too. One last thing. How do you sum a column and display a total? Any help would be greatly appreciated. Thank you.

Hi Elwin,

Welcome to VisualNEO Web, and thank you very much for your comments.

You are on the right track with neoTableSetColumn. The last parameter is a formatter function, which is exactly what you can use to change how a value is displayed without modifying the original data.

For example, if your SQLite date is stored as:

2026-08-29

you can create a formatter subroutine/function that receives the cell value and returns:

08-29-2026

The formatter logic (in Javascript) can be as simple as:

if (!value) return "";
var p = String(value).split("-");
return p[1] + "-" + p[2] + "-" + p[0];

For currency:

var n = Number(value);
if (isNaN(n)) return value;

return n.toLocaleString("en-US", {
  style: "currency",
  currency: "USD"
});
Then select the corresponding formatter in the last parameter of neoTableSetColumn for that column.
For example, conceptually:
neoTableSetColumn "MyTable" 2 "date" "Date" "" true false true dateFormatter
neoTableSetColumn "MyTable" 3 "amount" "Amount" "" true false true currencyFormatter
The basic neoTable example you are already looking at is here:

https://visualneo.com/tutorials/neotable

Regarding summing a column, the current neoTable actions do not expose a built-in summary/footer option. You can already calculate the total from your data (or directly with SQLite using SUM()) and display it in a Text/Headline/Container below the table.

I have also checked the underlying table library and it supports footer formatters natively, so this is something we can expose in neoTable in a future update and make column totals much easier.

If you tell me the actual field names you are using for the date and amount columns, I can prepare a small working example based on your table.

Regards,
Luis

Thank you Luis.

My fieldname for the date field is "Event_Date". My fieldname for the currency field is "Amt". Then I have another field that is two decimals but not currency and that is called "Points". Thank you again.