Discovering DataFlex video overview list
Discovering DataFlex
Do you want to build your own IT-system? Even if you are not a developer, you will be able to follow the steps Johan take in building a large scale application using DataFlex.
This is the first video in a series where we will dive in to the details as well as the broader strokes of building software applications. So, do not miss out. Download DataFlex at dataaccess.eu today and follow along.
Currently I have not decided what app to build and I welcome any suggestions in the comments. It is not that important, as we will try to focus on new details of the DataFlex framework on every episode. But it is nice to have some end goal to work against and talk about as we progress.
In this video I just want to give you a tour of the Studio and the useful features that make life easier for a developer.
Among other things we cover the following:
Tabs (code, tables, …)
F1 – To show help
F7 – Toggle code vs visual interface
Ctrl + Space – Auto complete aid
Alt + Arrow – Move selected rows
Ctrl + K – Toggle comments
Ctrl + Mouse wheel – Zoom code
Ctrl + Shift + S – Save all unsaved files
Run and debugging controls
Here is the link to where Harm showing the studio, he highlights some other things that can also be useful to know – https://www.youtube.com/watch?v=M5eSf…
If I missed any nice things then feel free to add it in the comments below.
If you want to start any coding project that you intend to continuously develop, you should put your code in GIT from the start. Used right GIT can be a life saver and it will save you a lot of time when managing your code further down the road.
Here is a link to my git repository where I will continue to push code I write in these videos https://github.com/virdun/Discovering…
Quickstart: building a Web Application (Mobile/Touch) with Eddy Kleinjan https://www.youtube.com/watch?v=5OUyC…
Create a mobile application with Johan Broddfelt https://www.youtube.com/watch?v=Kimys…
More information about using GIT with DataFlex https://dataflex.wiki/index.php?title…
One of the most important pieces in an application that is supposed to manage data is the database and it’s tables.
This video explains the most basic steps you need to take in order to create tables and relate them in DataFlex and some hints of what you need to think about when creating tables for a DataFlex application.
If you want to know what DataFlex can do in terms of developer performance in terms of building interfaces. This is the video you want to see.
Here is a link to my git repository where I will continue to push code I write in these videos https://github.com/virdun/Discovering…
Before you run away and show the project to your client, you want to add that little extra touch that will make them go WOW! That feeling will put them in a good mode and a spirit of fixing all the details as well instead of complaining of the things still lacking 😉
In this video I show you a few simple tweaks that will give your application that extra push and reveal a hidden trick to overcome the tedious issue of cached CSS-styles in the browser.
Web App Styler, where you easily can change brand colors of your application https://styler.dataaccess.eu/
Visit the GIT repo to download the code https://github.com/virdun/Discovering…
If your application should be branded you probably also want to change the favicon and title. It makes it easier to find your app if you have many tabs open in the browser, but it will also put your logo on the link document on your desktop or phone when you create shourtcuts which is really nice.
This is one of the core advantages of using DataFlex and it’s Data Dictionaries. By just adding a few lines of code, a total or sum can be maintained regardless of where in the application you change, update or move an item.
If you have a parent child relationship and want to maintain a calculated value from the children in the parent. This is the way to do it in DataFlex.
This week we got a question from Brazil about how to highlight rows in a cWebGrid. This works for cWebList, cWebHtmlList and cWebPromptList to style items separately based on any criteria.
If you want to highligt items with missing data, passed expiration, above or below a threashold or based on a key, this is the way to do it.
Is there any ware you type a search term today where you cannot press enter to get the result? Well we should not be worse then the norm, let’s add this feature to our application as well.
Those of you who have most of your DataFlex experience in Windows and console mode applications are probably familiar with On_Key. This does not work in a web application, so we need to change that to AddKeyHandler instead.
UX (user experience)
Visit the GIT repo to download the code
https://github.com/virdun/Discovering…
One common thing when working with lists, you often run in to the task of adding a delete button to remove rows from the list. In this video we not only delete the row, we also add a button as an icon and include a yes/no popup question in order to verify the intention to delete.
Using your voice is all good, but what about letting the computer speak? If you want your system to tell you things instead of showing data on a screen, then this is a good place to get started.
Word of causion though. Having the application present information using audio might give your users a slight shock if unanounced or if the audio is of the users might nog get the information at all. Just a thing to consider before using this all over your application.
https://github.com/virdun/Discovering…
Dates are one of those formats that cause lots of confusion. Especially when migrating between databases but in this case I just missed to take them in to account when not set. So, let’s have a look and get that fixed.
Visit the GIT repo to download the code
https://github.com/virdun/Discovering…
Most controls in DataFlex are completely data aware right out of the box. Radio buttons do need a little love before they behave as you want them to. But no worries, in this video I show you how =)
Sometimes you want to access the same table from one view multiple times. This is not possible of you still want to benefit from the powerfull DataDictionaries. The way to work around this is by using something called an alias table, which is a separate DataDictionary that points to the same table. When including parent tables in a view, alias or regular you sometimes want to decide if they should be mandatory or not. You can do that by setting the property ParentNullAllowed.
In this video we will look into all of this to see how it is done.
In this video I set out the make the changes from last video globally avilable by moving the ParentNullAllowed command to the global ItemDataDictionary. But I realize that I also need to make sure that the DefaultLocationDD is included in the DD structure in every view where I want to be able to save an Item. There is a relationship in the database that is established in the ItemDataDictionary Class and it seems that I also have to tell the DD structure in the view how to manage that. So, it turns out there was a bug in the code as well that needed to be fixed.
Now we will have a look at the UX again. The toolbar is handy in many views generated by wizards. But if you make a more custom view they might be more of a distraction then any us. In this episode we will remove the toolbar where we do not want to use it and keep it where it make sense.
https://github.com/virdun/Discovering…
https://github.com/virdun/Discovering…
https://github.com/virdun/Discovering…
https://github.com/virdun/Discovering…
https://github.com/virdun/Discovering…
https://github.com/virdun/Discovering…
Though our code for importing CSS work, there are cases where it fails. It is time to fix those cases.
https://github.com/virdun/Discovering…
I’m sure you have never had any issues while migrating databases or updating tables from your development to the production environment. But I have… I have a bad habit of playing around with things I should not touch and learning a bunch of stuff in the process.
In this video I want to collect all the things I have learned about debugging issues I have been upp against in one place so that I can refer back to it whenever I run into a problem with the database again. (…because it is bound to happen)
This is focused on MSSQL but if you are using any other SQL based database connected to DataFlex, most of the things I talk about in this video will still apply. I cover issues with backups, relationships, indexes, cached metadata, table definitions, RECNUM issues and where to look for connection issues with the database. Please feel free to share if I missed anything important to look out for and if there is anything in this video that can be explained better, I’d love to read about your insights as well.
In this video I show you the cWebExpandPanel, why it did not work for my purpos and how I ended up creating the layout I wanted.
Video about WebList in DataAccess Learning Center
https://learning.dataaccess.com/cours…
Having made such nice panels in our last episode, let them not get to waste. In this episode we will do a function that can pad a string up to a sertain length with any character of our choice.
If you have any suggestions on other functions that might be usefull that we can add to our TDD list just write it in the comments below.
Adding charts to your appliction can be a very good way to visualize data. In this first video we create a control that display a pie chart using the AmCharts library. In the next episodes we will look at uppdating the chart with live data from your system and in the last episode we will setup an event trigger that can send data back to the system and update other controls.
Am Charts
https://www.amcharts.com
Custom Controls
https://learning.dataaccess.com/cours…
In this video we are sending data from the back-end up to the front-end javascript that serves the data to the graph.
Be aware of the scope issue when you copy the sample code into you control. So, make sure to remove the “var” or you will be left with a blank screen.In this video we are sending data from the back-end up to the front-end javascript that serves the data to the graph.
Be aware of the scope issue when you copy the sample code into you control. So, make sure to remove the “var” or you will be left with a blank screen.
In this final video on creating a chart component we will handle events in the chart and send them back to the server, so that we can use the information for other things.
With this knowledge you should be able to implement solutions for any other graph from the amCharts library as well.
True or False, what else is there to say about a boolean variable? Well, as it turns out there are a few things to keep in mind. Like how different types evaluate to boolean values in if statements and how does DataFlex handle NULL values.
As usual you can download the code in GIT at
https://github.com/virdun/Discovering...
2147483647 is a number you should remember, because that is the upper limit of a regular integer. We also take a look at the integer definition in database tables and how they differ from the DataFlex configuration to the way integers is defined in MSSQL and a few other things on how other variables convert to integers.
You can download the code in GIT:
https://github.com/virdun/Discovering…
There much to be said about strings. Appart from the obvious limits of string size in variables and functions that manipulate strings in different ways you have issues that can arrise with different character encodings and special characters. In this video I try to cover a wide variety of things that you should be aware of and with a few samples on how to use some of the string functions, like left, right, mid, pos, replace and replaces being a few.
As always any comments on things to add to this page is more then welcome in the comments below.
You can download the code in GIT:
https://github.com/virdun/Discovering…
Date is an odd type. Especially if you try to consider how it is used in different countries. But DataFlex, having been around since 1976 have a few short hands for dates buildt in that probably seemed good at the time, but might cause some unwanted behaviour these days. Especially if you are not aware of them.
As always any comments on things to add to this page is more then welcome in the comments below.
You can download the code in GIT:
https://github.com/virdun/Discovering…
This video covers a set of closely related variable types. DateTime, TimeSpan and Time. We will look at the ranges for these variables and how to work with them. We will also check how different date formats effect the values in the DateTime type. The TimeSpan is an effective way to do calculations between different date and timestamps.
As always any comments on things to add to this page is more then welcome in the comments below.
You can download the code in GIT:
https://github.com/virdun/Discovering…
You are going to run in to situations where an integer is not enough. That is when you start playing with Number and Real. They can add enough decimal points for most of your needs. For this video I also covered a list of math functions in DataFlex, since I feel they are related to the topic of this video. Here is the list I cover: Abs, Round, Log, Exp, Sqrt, Mod, ModAlt, Random, Acos, Asin, Atan, Cos, Sin and Tan.
As always any comments on things to add to this page is more then welcome in the comments below.
You can download the code in GIT:
https://github.com/virdun/Discovering…
DataFlex have a list of different variable types and I do not want to do a deep dive on each and everyone of them. So, to end this miniseries about variable types I’m just going to go through them all in a breef summary.
If you want a pdf with all the variable types, here is the link:
https://johanbroddfelt.se/download_fi…
There are a few things to get used to when switching to working with DataFlex. One of those things are the spoken language approach to the code. This is a mini-series about the basics of the DataFlex language starting with if- and case-statements and wrapping up with different ways of creating loops.
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
Arrays are your best friend when you need to manage large sets of data. There are many situations where you need to keep track of a list of things and do calculations, sorting, searching and manipulating data in arrays. Then it is good to know that there are many built in functions that can help you do that.
In this video I only cover the basics. There is more to be found in the documentation.
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
Structs are the way to go if you want to store complex data structures in DataFlex. The data can easily be accessed using dot-notation and can be used just as any other variable type.
One of structs main advantages are that you can pass a large set of different data over to a method using one simple variable name or keep them grouped in an array.
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
DataFlex make use of both Procedures and Functions as options for creating methods. In this video we will take a look at how they are implemented and how to use them.
Features we cover are globals, call by reference, setting default values for parameters and the two ways you can call functions.
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
Working with Classes and Objects in DataFlex is not the same as you are used to from other languages. When instatiating an Object, DataFlex will define a new “secret” subclass. This gives DataFlex it’s unique style of structuring code in applications, that many experienced developers prais it for.
In this video, Johan Broddfelt will explain how this works and show you some samples that will clarify this concept.
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
There are many situations where it is useful to write to a file on disk. But if you want to write to the disk, there are a few things to keep in mind and that is why I prefer to package all the complexity in a procedure.
This simplifies the file management in the rest of our code from about 15 lines of code down to one.
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
Sometime systems behave in strange ways, usually due to some unexpected user input. When that happens it is a great reliefe to get real time notifications about what happend and who was using the system.
In this video we create a small procedure that help me sleep at night as I know that the systems I maintain will report to me if something is failing.
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
When creating files you sometimes want to manage a folder structure for the files as well. So, wouldn’t it be great to have a function that can do that for us?
In this video I’ll show you how to automatically generate folders if they do not already exist and as a bonus Chris pointed me to the CallStackDump, which is immensely useful in our DebugLog procedure. Thus I’ll start out the video by showing you why.
Code samples are available in the GIT repo: https://github.com/virdun/Discovering…
One of the basic things you do when writing programs is read an write to files. In this video we are going to look at a small function that take a path as input and read the file into a string. This data kan be used in many ways depending on the content on the file, så encapsulating this code in to a one line function call is a no brainer.
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
If you have settings that you do not want to risk copy to your test or deveopment environment, like enable send mail or you want to be able to change some properties in the code without having to re-complie the entire application. Using a configuration file is a realy great option.
In this video we use the ReadFile function from last week to read configurations from a settings file that is stored on the disk.
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
Reading the documentation to understand how the core of DataFlex magic work can make your head spin. Should you use the Record Buffer or the File Buffer? Perhaps the Table Buffer or the Local DDO Record Buffer. If I move a value to the File.Field Buffer how can I save it to the data base?
In this video I try to clarify the confusion and explain how the basic structure of Data Dictionaries (DDO) work when it comes to using buffers from accessing data in the database to maintaining data in the Data Entry Objects (DEO).
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
The data is stored in the DataDictionaries as the application is running. But how do we access the data and what is the difference between Field_Current_Value and File_Field_Current_Value?
In this video we will take a look and try all the ways I can imagine that these data retrieving functions could be used in order to understand how they actually behave in different contexts and when to use which.
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
If you want to modify information programatically when you have the data loaded into a view you should always use DataDictionaries. When I started out i struggled with figuring out how to use them properly. So, in this video I want to bring you trough my journey of understanding how to properly work with these creatures.
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
Creating and Updating data on the global buffer can unintentionally break your application business rules. To avoid this we are going to rewrite our CSV import script, using Data Dictionaries instead.
Having the rules for your application in a central place allows for more rapid development when creating new views and other data management functions, making it the prefered way to deal with data.
Create your first tables:
https://youtu.be/YQE08zN6Fqo
CSV Import videos:
https://youtu.be/tKFjjM6A5WA
https://youtu.be/t1-Q-iiaW4o
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
If deleting data is not a crime it is for sure a bad practice, in most cases. Data is often refered to as the untapped gold mine of businesses today and analysing it and presenting it in a good way is instrumental for their growth.
In this video Johan Broddfelt will show the different options you have to “remove” data in applications both if you are sure you want to delete it and if you want to keep the historic record for future analysis.
Instead of adding an empty procedure OnConstraint in the view in oLocation_DD I can use the following in the global Item DD class instead. Less code, same result.
Set pbInheritConstraints to False
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
he power of using code to filter data is that you can easily create very elaborate filters also between tables, that present only the information the user want in your view. Constraints can be used both in a global setting or tailor defined for each specific view.
Johan Broddfelt is also revealing one situation that might be on the limit of what the Data Dictionaries can manage whan it comes to constraints. But hopefully some of you viewing this video have better suggestions on how to solve it 😉
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
Events in Data Dictionaries
50 visninger 25. apr. 2022 While DataFlex is processing data inside the Data Dictionaries you get access to insert your own code. Knowing how and where is key to building a stable application. In this video we take a look at how we can create our own debugging class for these calls and get to know a little bit more about what we can influence behind the scenes.
DataFlex 17 Data Dictionaries Multi Level
https://www.youtube.com/watch?v=qvzCn…
Update and Backout for totals
https://www.youtube.com/watch?v=iV3uZ…
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
Want to create dynamic views that just work. Connected to the data in your database. Well that is what you get when using DataFlex and it is automatically set up for you when generating views using the wizards. But what are the key elements that bind your Data Dictionaries to the Form Objects in the View. That is what we will cover in this video.
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
Clear, Move, Find are the fundamental building blocks of working with data in DataFlex. They give you great power over the data, but with great power comes great responsibility. In this video Johan Broddfelt will walk you through some of the ways you can find and sort data from the database.
If you are an old DataFlex developer who is new to SQL you might also learn about how SQL can be used in place of CMF to get the data you need in your application.
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
Debugging Data Dictionaries
If you followed along my videos on Data Dictionaries so far, you should have a fairly good intuition on what they are and how they work. But working with DDO:s in real life can be tricky and you might want to take a look inside of them as you run the application. Well, lucky for you. There is a way to do just that and I’ll show you in this video.
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
There is a constraint option I have not yet covered, and that is the constraint function. As it turns out this was the solution to my problem in my last video on constraints where I was trying to create some array of properties to constrain by. But thanks to Mike who pointed this out, I have now made a video with a solution to that as well. A small caveat before we begin. Using constraint functions can, if used in the wrong way, slow down your application quite a bit. So, use this technique with care.
#DataFlex
https://youtu.be/5US4pvF4aoE
My previous video on constraints:
https://youtu.be/J2BksGX2gI4
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
As you projects grow larger the need to structure information, like your views, become more important. Here is a litle tips on how to do that in the studio.
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
How often do you speak with your computer? If you are thinking about adding voice commands to your applications, you might want to take a look at this presentation first.
(If you only want to see my presentation it starts 4 minutes in to the video.)
As always it has been a blast at EDUC with lots of inspiration from presentation, deep conversations about programming at the bar and a packed schedule from day one with a good mix of entertainment and education.
For those of you who are not familliar with the DataFlex event EDUC, it is the European DataFlex User Conference that is usually held every other year.
Though the latest version is packed with new great features, there is only one thing that I need in order to do my work at the moment and that is to get rid of a strange error that occurs when my SQL-query gets too large.
Read more about what’s new in DataFlex here:
https://www.dataaccess.eu/what-s-new-…
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
The goal for this video was to show how to watch the values from inside a DataDictionary while debugging, without having to write it out to temporary variables. But I also found a bug that gave me the oportunity to explain a bit more on how to think about the interation between DataDictionaries.
The video where this bug was introduced can be found below.
https://youtu.be/5US4pvF4aoE
Code samples are available in the GIT repo:
https://github.com/virdun/Discovering…
It is the small things in life that makes a difference. In this case it is a way to quickly see what version of DataFlex you are starting. Yes, you can just hover a second over each icon to see the version. But if you work in more then one version at the same time, for instance if you work on multiple projects it is quite handy to be able to see which version you are starting up.
Link to the icons:
https://www.dataaccess.eu/resources/d…
This video is based on a request from Moazam who wanted me to show how to upload and manage files and images in a Windows application.
The first that comes to mind is to use the BitmapContainer, but if you want to work with anything appart from .bmp files, you should probably take a look at the Graphics Library:
https://www.dataaccess.eu/resources/d…
But in the later versions of DataFlex you can also use the cWebView2Browser that allows you to add a mini browser in your Windows application, that also can be used to display web friendly images. That is the solution I picked for this video.
The source code can be found here:
https://github.com/virdun/Discovering…
Watch the original video on how to do this in a web solution:
https://www.youtube.com/watch?v=rIRsC…
Visit the GIT repo to download the code
https://github.com/virdun/Discovering…
In some cases, the functionality provided by a component may not be enough to meet your needs. Rather than starting from scratch and creating a new component, you can inherit the existing component’s functionality and add the missing pieces to create your own component.
This video demonstrates how to extend the cWebDatepicker component by adding the ability to select both a “from” and “to” date within the same component, with the interface updating accordingly. In addition to creating an advanced datepicker, the video teaches skills that can be applied to extending any web component in DataFlex.
Visit the GIT repo to download or read the code
https://github.com/virdun/Discovering..