In this blog post, I will cover three new features in Qlik Cloud:
Subtotals in the straight table
Exit error
Creating text and image objects from pasted images
These are small features, but useful improvements that can be used when building your analytics apps.
Subtotals in the Straight Table
The first is the ability to add a subtotal row to a straight table. This is something we are used to seeing in a pivot table but not a straight table. Developers can now toggle on Show subtotals in a dimension field of their straight table to add subtotal rows.
Once Show subtotals is toggled on, the Label property becomes available allowing the developer to rename the label. In the table, a subtotal row is added for each asset class.
Exit Error
The second new feature is Exit Error, which is used in the script to end the execution of the script with a user defined error message. The syntax as found in Qlik Help looks like this:
Exit Error expression [(when | unless condition)]
For example, assume you are loading data in a table, and you want to exit the script execution if no data has been loaded. Using Exit Error, a variable can be checked (or some other condition) to determine if there are rows in a table that was previously loaded. If there are, continue with the script; if not, exit the script with a message. In this example, the vOpenOrders variable will be 0 if there are no rows in the table.
If the variable vOpenOrders is equal to 0, then exit the script and show the message “No open orders were loaded.” This is how the error will appear.
Creating Text and Image Objects from Pasted Images
The last new feature is a cool shortcut to create a text object or an image object. Simply paste text or an image onto an empty area on a sheet and a new text object or image object will be created. In the case of images, the pasted image will be automatically saved to the media library – a time saver. On the sheet below, I pasted this text: “I am going to create an image with this text.” and this image:
And a text object and image object were created without any additional work from me.
Note that the developer will need upload permissions for the image to be added to the media library.
That's three new ways Qlik Cloud is making app development easier — smarter subtotals, cleaner error handling, and a slick shortcut for pasted content. Small features, big time savings. Try them out in your next app and stay tuned for more updates coming soon.