Using constants in Go Calc

One of the many powerful features available in Go Calc is user defined constants. When you are writing a formula you can refer to a variable or result in another calculation. One way you can use this is by defining commonly used constants. In this post I will show you how to define a constant for VAT (Value Added Tax, called Sales Tax in the US).

Here is a Go Calc freshly purchased from the App Store:

Go Calc just installed

I am going to create a category (folder) to store my constants in. Simply tap the Edit button and choose New Category. I will name the category Constants.

Creating a new category 1 Creating a new category 2 Creating a new category 3

Tap on the newly created Constants category and tap the Add (+) button to create a new calculation. This calculation will store the financial constants.

Empty Category New Calculation Finance

Click Save to start editing the calculation. In this example just one constant is going to be added. Tap the Add Variable button and we will add the VAT constant.

Editing the Calculation

The variable name is VAT, a suffix % is added and two decimal places are to be shown.

New Variable VAT

Tap Save. You can now set the current VAT rate – double tap on the VAT variable (or tap the blue indicator)

Showing the VAT variable Setting the VAT value The set variable

I will now create a new calculation which will use this constant.

Creating the example calculation

The calculation has a variable Price Exc VAT

Variable Price Exc VAT

… and then add a result which will work out Price Inc VAT. The formula refers to the constant defined earlier. To refer to a constant you need to describe the path needed to reach it. In this case the constant is in the Finance calculation, which is filed in the Constants category. So we write Constants.Finance.VAT (<category>.<calculation>.<variable>). Using this technique you can refer to any variable in any calculation you have in Go Calc.

New Result 1 The formula

Here is the example calculation in use.

The example calculation

Now if VAT changes you can change the constant and any calculation using it will automatically have the up-to-date value.

Happy Go Calc-ing!

Special: pages in Trunk Notes

Trunk Notes reserves a few page name prefixes – Docs:New: and Special:. If you try creating a page starting with any of these you will be told off and made to choose something else. In this post I will give you some details about the Special: pages and what they are used for.

First up is Special:WhatsNew. When you upgrade Trunk Notes to a new version you will be asked if you want to view this. It contains details of all changes to released versions of Trunk Notes. If you want to see exactly what is new then check this out. Related to Special:WhatsNew is Special:Version. This lets you know what version of Trunk Notes you are running. If you need to report a problem then always let me know what is contained in this page. Finally there is Special:Debug. If you are having issues with Trunk Notes then you might look here to see if there are any worrying debug messages!

A page that you might want to check out is Special:SetStyleSheet. If you can’t find this turn on Custom Stylesheet in the Trunk Notes settings. By default this has a copy of the standard stylesheet. A stylesheet is written in a language called CSS and contains instructions for Trunk Notes on what fonts, colours and layout to use. By changing this file you can change the look and feel of your wiki pages. For an introduction to CSS have a look at http://www.w3schools.com/css/

Next up in customising how Trunk Notes works are Special:Header and Special:Footer. Any text in these pages gets automatically added to the top and bottom of each page. Here are some ideas for how you might use these:

  • Add a list of pages linking to the displayed page – put {{backlinks}} in Special:Footer
  • See the tags which a page has – add {{tags}}
  • If you are an advanced user why not add some JavaScript to do something cool

Another useful page is Special:Badge. By default this page includes the text {{tagged ToDo}}. When you switch from Trunk Notes to your home screen any list items are counted in this page and if the number is bigger than zero the badge on the Trunk Notes app is set. Try tagging some pages with the tag ToDo and see this number go up. You might change this to use a number of different tags, or to use the GTD functions such as {{dueinnext}} or {{action}}

The last useful page is Special:Encryption. This page has controls to forget a recently entered encryption password or to change the password. This page represents the master password. Trunk Notes doesn’t store the password you set but rather it encrypts this page’s content with your chosen password. If when you type in your password it can successfully decrypt this page then your password is correct. If it can’t decrypt Special:Encryption then your password is wrong.

There is one more page – Special:Tagged. This is what links in tag clouds or lists of tagged pages point to. Try adding [[Special:Tagged?tagname=Work]] (replacing Work with one of your tag names) to see what I mean.

It is very likely that more Special: pages will be added to Trunk Notes in the future. Have fun!

New website live

The new Apps On The Move website is now live. There is still a lot I would like to do, and my hope is that this will provide me with a more extensible platform for the future. If you have any comments or find that some stuff isn’t working or could be improved then please let me know. The old site is still there ready to switch back as a last resort!

New website nearly ready…

I’ve been working on a new version of the Apps On The Move website. I’m hoping it is nearly ready to replace the old one. Still some work to do transferring blog posts across and browser testing.

The current/old website was created in Rapidweaver – which is a great piece of software. However I’m eager to move over to a CMS of some kind – primarily so it will be much easier to blog on the move. Having to write posts on my Mac and then upload isn’t ideal.

WordPress was chosen mainly as I didn’t have time to fully investigate all the possible alternatives – Joomla, Drupal, Concrete5, … – and there are many excellent professionally designed themes to choose from and easily tweak. PHP is a fairly sane language for a web platform.

If you would like to see the new website before it goes properly live, i.e. what people will see when they visit www.appsonthemove.com, you should be looking at it now. Feel free to have a browse and post feedback here. At the moment all comments are moderated. If I see that the majority aren’t spam I may remove that restriction, or look at adding some human check that isn’t too annoying.

Coming soon in Trunk Notes 2.4.5

Trunk Notes 2.4.5 is nearly ready for release. It contains a number of new features to give you even more control over your personal wiki.

First up is something which really should have been present from version 1.0 – page creation date. In Trunk Notes 2.4.3 and below the time a page is modified is stored, but the created date is not. Trunk Notes 2.4.5 rectifies this by keeping track of when pages were created. You can now view a list of all pages alphabetically, last updated, creation date and popularity. This will make it even easier to use Trunk Notes for journaling. Any existing pages will be assigned a page creation date of when they were last updated.

A popular request has been to support the use of file extensions when syncing to Dropbox. Trunk Notes will now cope with common file extensions such as .txt, .mkd, .md and .markdown. By default it will upload new files with a .markdown extension. This will make it easier for your text editor to recognise Trunk Notes files and provide appropriate syntax highlighting.

There are a number of new functions:

  • on/off: these allows you to set page flags. There are currently three page flags which can be changed – header, footer and easylinebreak. For example {{off header}} will stop Trunk Notes inserting the text from Special:Header at the top of a page. {{off easylinebreak}} allows you to write strict Markdown for a page and not have extra line breaks added
  • history: display the last n items viewed in Trunk Notes. Might be handy if you want such a list at the bottom of each page you view – just add {{history 5}} to Special:Footer
  • head/tail: if you are a UNIX geek you will recognise these. They allow you to insert the first or last n lines from a page. I use this will a one line journal I store in Trunk Notes. On my HomePage I have {{tail QuickDiary, 1}} to display the last entry from my journal

Another advanced feature being introduced allows you to customise how a list of wiki entries is sorted. This will be great for those of you who implement some kind of GTD system using Trunk Notes. For example {{action:priority<,abc @call}} will sort a list of all actions tagged with @call first descending by priority and then alphabetically.

The last thing worth mentioning is that some issues with proxies and Trunk Notes’ Wi-Fi Sharing feature have now been fixed. This should help those of you who have a work web caching proxy or filter preventing you from using Trunk Notes in the office over wi-fi.

I am going through some final testing before sending a release candidate out to registered testers. Assuming no issues 2.4.5 should be available on the App Store in the next few weeks.