We want to record a ‘Year’ value on a record in SugarCRM, but we don’t have a day and month to do with it, you can’t use a field that is of a ‘date’ type as that requires a full date (year, month, day).
You can use an ‘Integer’ field type tho. The downside is that it displays a thousands separator. i.e. it’ll show 2,014 instead of 2014.
To fix this, tick the Disable Format check box in Studio. This will remove the thousand separator.
[The four horsemen of mediocrity](http://sethgodin.typepad.com/seths_blog/2014/01/the-four-horsemen-of-mediocrity.html)
I’m using GeekTool to display some key time zones on my wallpaper, which happens to include world map.
The key to this is to add Shell Geeklets using a command similar to this:
env TZ=Pacific/Auckland date +'%l:%M %p %A'
I was just sent a link to this (source). Funny :).
Simple test to see if a field is null. I’m using this in Talend to determine if I copy the value into a new note field. You could use a length test, but if the field is a date, then you need to do it this way.
row1.field1 != null ? do_this_if_true : do_this_if_false
On Mac OSX (Mavericks) you can find your ‘iCloud’ documents in the relevant application folder like this:
Each application keeps its own documents in a sandboxed folder.
You can make an alias for a file and then move that to an appropriate folder, for example, I’m using Byword on the Mac, iPad and iPhone, thus I want my ‘List.md’ file kept in iCloud. Putting an alias to it on the desktop makes it easy to edit on the Mac. Using GeekTool I can have it automagically display the contents of ‘List.md’ on the desktop, essentially a ‘live’ file no matter where I edit it, even from iDevices.
This is how to use Talend to concatenate multiple columns (fields) into one field neatly.
Say we have three fields, row1.field1, row1.field2, row1.field3 that we want to insert into a output.notes column.
In the tMap component, use the following expression:
(StringHandling.LEN(row1.field1) > 0 ? "Field 1: "+row1.field1+" " : "")+(StringHandling.LEN(row1.field2) > 0 ? "Field 2 "+row1.field2+" " : "" )+(StringHandling.LEN(row1.field3) > 0 ? "Field 3 Address: "+row1.Address+", "+row1.Suburb+", "+row1.State+", "+row1.Pcode+" " : "")
What this does is check to see if field1 has anything in it (i.e. has a length longer than 0), if it does, it adds the field and a space after it to buffer it against the next field. If it doesn’t, then it doesn’t insert anything. It then does the same for fields 2 and 3.
Updated 2014-01-30 12h49m to put the code in a html code block and fix the double quotes which had been ‘smartly’ but wrongly changed.
I’m currently preparing some data for import into SugarCRM for a client. The source data has a column that contains the given names (i.e. “Jane Mary”) and a second column containing the surname (i.e. “Doe”).
Using Talend Open Studio we want to separate the given names into first_name and middle_names columns. So, how do we split the first name and middle name?
By using in the tMap component an expression.
For the first name, we do this:
StringHandling.INDEX(row1.GivenNames," ") > 0 ? StringHandling.LEFT(row1.GivenNames,StringHandling.INDEX(row1.GivenNames," ")) : row1.GivenNames
And to extract the middle name/s we use this expression:
StringHandling.INDEX(row1.GivenNames," ") > 0 ? StringHandling.RIGHT(row1.GivenNames,StringHandling.LEN(row1.GivenNames)-StringHandling.INDEX(row1.GivenNames," ")–1) : ""
The basic format of a ternary operation is this:
test condition ? do this if true : do this if false
Source: Savage Chickens.
This was new to me:
A third fascinating use case for Bitcoin is micropayments, or ultrasmall payments. Micropayments have never been feasible … because it is not cost effective to run small payments … All of a sudden, with Bitcoin, that’s trivially easy. Bitcoins have the nifty property of infinite divisibility: currently down to eight decimal places after the dot, but more in the future. So you can specify an arbitrarily small amount of money, like a thousandth of a penny, and send it to anyone in the world for free or near-free.
Source: New York Times.
This post is for Jared. I use the Feedly rss reader to keep track of news.
Quick easy fix for Insufficient Disk Space Warning When Attempting to Unpack and Install a Sage ACT! Update or Hot Fix. The error arises from the fact that the free space on the drive is a multiple of 4GB. The underlying issue is to do with a bug in InstallShield. To fix this create a file of 1GB, changing your free space available, to do so quickly, from a windows command prompt, on the drive affected run this command:
fsutil file createnew 1gbfile.bin 1024000
This creates a 1GB file. You no longer have free space that is a multiple of 4GB. Do the install, then delete the 1gbfile.bin file. More on fsutil on Technet.