New ScreenIO! New FileIO! Dates and other Fruits

Exciting new Business Rules announcements!
(Outgoing messages only)

Moderators: Susan Smith, admin, Gabriel

Post Reply
Gabriel
Posts: 412
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

New ScreenIO! New FileIO! Dates and other Fruits

Post by Gabriel »

ScreenIO and FileIO Update

A new update for FileIO (v2.48) and ScreenIO (v91) has been released. You can download it from the SageAX website, or by using the following links directly:

http://www.sageax.com/downloads/ScreenIO.zip
http://www.sageax.com/downloads/FileIO.zip

FileIO Update (Support for Dates)

This update adds Date Support to FileIO, supporting any storage formats on disk. Whether you store your dates in Julain or in YMD or MDY or any other format, specify so in the 4th column of your file layouts, using the FileIO Date Keyword. ex: DATE(Julian) or DATE(YMD) or any other valid BR Date Format.
Dates0.png
Dates0.png (33.75 KiB) Viewed 14305 times
When this is specified, it enables the FileIO data exploration tool (Data Crawler) to display the dates in human readable format. This works for both Viewing, and for Editing.

The new Date functionality also supports the File Layout Upgrade facility, allowing you to change the format of your dates on disk and FileIO will handle it automatically, upgrading the field to use the new date format for you.

It works also for Exporting your data files to CSV, and is supported automatically in the FileIO functions that do those exports. It converts the dates on export to a standard format (Default: m/d/cy) that you can specify in your FileIO.Ini File.

This update adds two new ini file options:

Code: Select all

DateFormatExport$='m/d/cy'  ! Format of Dates when Exporting to CSV
DateFormatDisplay$='m/d/cy' ! Format of Dates when displaying in Data Crawler
You can use these to specify your preferred Date format for Viewing/Editing, and your preferred Date format for Exporting.

Remember, you can see the full list of FileIO ini file options, by looking in the source code at the top of FileIO.

There is a new optional parameter for all layout reading functions, mat NDateSpec$ and mat SDateSpec$ which correspond with the other arrays, to let you know which fields are date fields, so that you can develop routines in your programs to automatically pack and unpack the dates.

Important Note: Using FileIO, the reading of the data file is still done directly in your programs. So this does not change how your existing programs work. It does not unpack the dates for you in your programs. You still have to do all that.

For this reason, upgrading to the new Date processing will not break any of your current code.



ScreenIO Update (Support for new FileIO Dates, mat VisibleKeys$, mat VisibleRecords)

Dates

This update adds support for the new FileIO Dates to ScreenIO, and it also adds support for ScreenIO Date Processing to non-Julian date formats. This will enable you to use ScreenIO Date fields for your legacy data files that stored their dates in another format.

There is now a new Control Attribute called "Disk Date Format" that, if specified, tells ScreenIO to unpack the field to Julian before processing it. It works along with the DATE Conversion Spec Control Attribute, (which previously only worked with dates stored as Julian), to enable a lot of useful date editing features.
Dates1.png
Dates1.png (17.42 KiB) Viewed 14305 times
This works on listviews too, so you can now specify these two fields, to make dates show as, for example "January 24, 2018", even if they're saved on disk as "MMDDCCYY". Or, like in the following example, as "MM/DD/CCYY" even though they're saved on disk as "MDY". Specifying the date format this way, makes the listview column sort correctly in date order, no matter what the displayed format is.
Dates2.png
Dates2.png (36.04 KiB) Viewed 14305 times
Note: If you specify the Date format in your file layout, following the instructions for FileIO above, then ScreenIO detects that and fills in these fields for you, automatically enabling Date processing.

ScreenIO also has a new INI setting you can control:

Code: Select all

setting_DateFormatDisplay$="m/d/cy"
This determines the default date format to use when you add fields that are marked in FileIO as Date Fields. This is the format you want your end users to see and interact with.

mat VisibleRecords and mat VisibleKeys$
ScreenIO now also provides your custom functions with two new arrays, mat VisibleRecords and mat VisibleKeys$. These arrays work on a listview screen, and they contain the keys and record numbers of all rows on the current listview that are Currently Visible. If the user uses a filter box to filter the listview, or sorts the columns in the list, these arrays update in real time, telling your functions exactly which records are currently visible in the list, and in what order.

Going along with that, there is a new function called ExportCurrentFileCSV, which exports any (user selectable) fields from the data file in a CSV format, for any records that are currently displayed on the list, taking into account the current filters and sorts. It works like the old ExportListviewCSV function except that it enables the end user to select which fields they want to export, and they can choose from any in the file.

(If you want to only give them access to certain fields, make a copy of your layout and mark out whatever fields you want to hide by making them "X" fields. Then use this layout for your screenio screen and they will only have access to the remaining fields listed in it.)


I really hope you enjoy these new date features as much as I enjoyed coding them, or maybe hopefully just a bit more. Please write me or call or post on the forum, with any questions you have about the new features, and any issues you run into with the new update. This is just a cursory explanation, there isn't room in a forum post to give a more detailed description.

Your questions let me know you care!

Gabriel
Susan Smith
Posts: 717
Joined: Sun Aug 10, 2008 4:24 am
Location: Southern California

Re: New ScreenIO! New FileIO! Dates and other Fruits

Post by Susan Smith »

These are great new features, Gabriel! I'm sure that many people will benefit. I can see all sorts of useful ideas for the Mat VISIBLE$ arrays, especially. And it would be very nice to have dates display in human form in the Data Crawler thanks to the new date features.

-- Susan
Gabriel
Posts: 412
Joined: Sun Aug 10, 2008 7:37 am
Location: Arlington, TX
Contact:

Re: New ScreenIO! New FileIO! Dates and other Fruits

Post by Gabriel »

I have updated FileIO again, to resolve a small bug in the last version that broke non-mixed file layouts. (Thanks Mikhail for finding and reporting this bug).

Because of the bug, you could no longer use the DataCrawler to view data files made of purely numeric or purely string fields. It is now fixed.

If you downloaded it before, download it again, to be able to use the Data Crawler on your single fieldtype data files again.

http://www.sageax.com/downloads/ScreenIO.zip
http://www.sageax.com/downloads/FileIO.zip

Gabriel
Post Reply