4 coding concepts you should know as a non-coder
You are not a programmer but would love to automate your daily chores “away”? Your IT department does not offer help with business process automation, your use case is not big enough or maybe your are a freelancer and all by yourself.
Maybe you already heard of low-code and even no-code solutions like Microsoft Power Automate (formerly Microsoft Flow) or Zapier. And knowing the tools you can use is a good start, but experience shows that the problem is another one.
Most of the times people don’t understand HOW they can automate a process. What makes up an automation? They only see a complex task and want it to be automated. And this is perfectly fine, if you can work with a developer who is doing this for you. But with just some basic understanding and these new tools you will be able to automate a lot of tasks yourself, being your own developer!
This does not only safe time and money for your company but also empowers you to solve your own problems. You will be amazed, what is possible without actually being able to code!
TL;DR
Triggers; each automation needs to start from something
Data Types; the difference between a number and plain text is important
Conditions; know when what should happen
Loops; do the same thing for a list of items
Triggers
First there is the Trigger. Every automation needs a starting point. This can be the push of a button, a specific time or an external event. But there has to be something.
This is something many people don’t think about when they want to automate a process. This is of course dependent on your specific use case. Triggers are easily identified, when going back to the drawing board and visualizing your process before you start developing a new solution.
Last resort is often a scheduled task (e.g. occurs every day at 6:00 AM) or a manually triggered automation by pressing a button.
When using Microsoft, Power Automate provides you with triggers for a lot of different tools. The one I am probably using the most is “When an item in a Sharepoint list is created or updated”.
Data Types
There are just a few data types you should know about.
String: plain text.
Integer: Whole numbers.
Float: Numbers with decimals.
Boolean: true or false values.
DateTime: represents a specific point in time.
The most important part is to use them when you store your data.
Imagine you have an excel table with 3 columns: Subject, Content and Delivery Date. As soon as the Delivery Date is reached you want to send an email with the specified subject and Content.
In Excel all your fields are string fields. Meaning you can put any text in them. So even if you want the “Delivery Date” to be date, it could still be anything. (or just contain a typo) So when your automation reads the field and tries to extract a date, you can’t rely on your automation to work. It will break, when the format changes.
Again in the Microsoft world you can give Sharepoint Lists (Microsoft Lists) a try. They are easy to set up from Sharepoint or Teams and allow you to create columns with a specific data type. This will make your automation way more resilient.
Conditions
Conditions are your way of navigating through different scenarios in your automation. Similar to triggers this is specific to your process. Bring your process to paper and figure out the intersections.
Once you know your process flow it is time to implement it. To do that you need to know about logic. Simply put you are putting out a statement which is then determined true or false. Mostly you will compare two different values of the same type to one another.
1 equals 1 = true
1 is bigger than 3 = false
Integers are the easiest to compare but you can do this with any data type. Of course in your case you will compare at least one variable to another.
UsersAge is bigger than 18
UsersName equals “Max”
In these examples data types are again crucial. UsersAge must be an integer and UsersName must be a string.
In any case you are checking: IF your statement is TRUE, THEN do this, ELSE (FALSE) do that.
Another form of condition is a switch. This is an intersection with not only two, but multiple possible outcomes. You are comparing one value to multiple values. In this case you require also a “default outcome” if you value equals non of the outcomes.
UsersName equals
“Max”
“Jack”
“John”
default
If you need to check multiple conditions you can do either one by one by chaining them after one another (this can get really messy) or you can put all of them in a single statement by using advanced logic, making use of AND and OR operators. More on that mybe in a later article.
Loops
Let’s get to the part with the highest impact. Loops allow you to execute a set of actions for multiple objects. So for example you can send an email for each row in an excel table, by defining the “Send email” action only once.
In coding there are more or less 3 types of loops:
for-loops
while-loops
foreach-loops
The for-loop runs a specific number of times. You start at 1 and count up for each iteration until you hit a threshold.
The while loop continues to run as long as a specific condition is met. (e.g. “allEmailSent = false”, as soon as “allEmailsSent = true” the loop would end)
The easiest and most-common nowadays (especially in low-code environments) is the foreach-loop. For this to work you need a list (or array) of objects you can iterate through. There is no further setup necessary. There is just one downside to this type of loop, being that you can’t manipulate the list itself while using this. (e.g. you can’t delete the object from the list while you are looping that list)
With the understanding of these 4 concepts you are able to outline your process and understand what parts can be automated and digitalized. I suggest that you try out Microsoft’s Power Automate or Zapier (if you are not on Microsoft 365) and try for yourself. If you are using Azure, Logic Apps are the equivalent to Power Automate.