Franz Rodenacker, Head of User Experience at Digiata Technology Services, tells us how he uses Linx at work, share some advice for first-time users, and take us through the process of automating a sales report.
How did you use Linx to automate your sales report?
The data sits in a SQL database. It needs to end up as a table of data in someone’s inbox. I started by splitting my problem up into various sub-tasks. First I created a process that would do three things for me:
- Fetch the sales data from the database
- Create the report as an HTML table
- Send the table in an HTML email
Next, I automated the process by adding a timer service. Then I simply uploaded the completed solution to my server, and started the service. I started with a process, but you could create a timer service first and then add functions directly into the service event. Either way, you need the following steps:
- Drag on a String type to store the HTML table rows. Set initial value for this string to <table> – I called my string HTMLReportsDataTbl.
- Use a SQLExecute to fetch the data you want displayed in your report. Use the return option called row by row to loop through the results.
- Use a RazorTemplateTransform function to create each row in the table in the loop (the Model is the row returned by your query and the Template is some html with placeholders for the data.
- Drag on a SetValue function to set the string. The value you add in each loop is HTMLReportsDataTbl + RazorTemplateTransform to build up the string.
- You may want to test this to make sure your string looks right. Right click on the SetValue function and select Enable Logging. Then hit the Run+Debug button and start the Debug (start button). If everything works, the Debug output window should show you your html rows.
- Outside of the loop, add another SetValue with the value of HTMLReportsDataTbl + ‘</table>’ to close off the table html.
- Add a SendEmail function and complete the required properties here. Make sure you set the Body Format property to HTML.
- Now hit Run+Debug again to make sure it works as expected. This is the point where you may want to tweak and style the html to suit your visual needs by adding a header row, cellpadding, borders and the like.
- When you are happy with the result, add a Timer Service from the top bar. Define the schedule when this should run and drag the Process into the Timer Event.
- Deploy the solution to your server and browse to the server.
- Find the solution and start the timer service.
Ready to get started? Watch the video tutorial
To make it even easier for you to get started, we’ve recorded a helpful two-part tutorial:
Low-code software leads to happier developers
Rodenacker sums it up “Linx is a powerful example of the practical side of digital transformation. As a result of using this platform, I am able to start his day in peace and enjoy his holidays without worrying about work. I’m happier, and so is my colleague in the sales department.”
How could Linx make your life easier?