Wednesday 15 November 2017

Lazy IF statement for Variable Assignment

Five-line code

If &Color = "Blue" And &Pet = "Dog" Then
  &Flag = True;
Else
  &Flag = False;
End-If;

can be converted to one line

&Flag = (&Color = "Blue" And &Pet = "Dog");

&Flag is TRUE if both conditions are true.

False otherwise.

Wednesday 18 October 2017

Help! Excel VLOOKUP is so DAMN SLOW!

Warning: This post assumes you know the basics of Excel VLOOKUP.


By default, Excel automatically re-calculates formulas in the spreadsheet.

Problem is if you have a VLOOKUP against 100k+ rows, it's gonna be a long day for you at the office.

Here's how to fix that.

Saturday 1 July 2017

Using Drilldown URL Links in PSQuery

This nifty trick basically allows you to create hyperlinks on a PSQuery result.

Very useful for those drilldown reports where you click a link and it brings you further down the rabbit hole to more detailed information.

In this case, we will create 2 queries and try to link them using Drilldown URL.

Thursday 11 May 2017

PeopleCode: How To Remove Tags With Blank Values From XML File

Wish there was an easy way of parsing an XML file using PeopleCode without having to write all these loops.
Here's a quick function that removes xml tags with no value (blank, nulls.. zeroes excluded).