0800 083 7663
SOLCASE TIPS - DECEMBER 2006
Understanding and coping with Null values
Anyone who has done any work with databases such as Access or SQLServer will be familiar with the concept of a NULL value. For those that are not, NULL means the absence of any value at all. This is not the same as blank, blank is itself a value, a value of nothing. Null means there is no value at all. You cannot use a field that has a NULL value. Solcase copes quite well with this and will, in effect,treat null fields as blank IF THEY EXIST WHEN THE MATTER IS OPENED.
COMMON PROBLEM : You create a new User-Defined field in Solcase and you want to test against it in a script. No problem if the matter is created after you created the field but not so for any matter that already existed. Why does this matter? It matters because if you try and test fora blank field it will not pick up the field. e.g.
[&If ABC01=""]
[&Show
ABC:1]
[&EndIf]
..... wil only work on newly created matter or if you have actively assigned a blank to it eg [&Assign ABC01=""].
article by Richard Arney
SEG USER FORUM
Unfortunately we have had to suspend this useful service as some users objected to publication
ABOUT PARASOL
Parasol was originally conceived in 2005 to provide expert help for solicitors struggling to get a return on their investment and make the best of their Solcase or Visualfiles installation.
The Parasol Consultancy Group was initially set up by:-
Richard Arney
Affik Choudhury
Andrew Hall
Tim Long
Bryan Tulloch
SAMPLE CODE
If you know all the possible values of the field then you can test for null or blank by saying
[&If ABC01 &IsOneOf "value 1,value 2,value 3"]
[&Else]
[&Show ABC:1]
[&EndIf]
However you may NOT know all the possible values . In that case the following should solve the problem:
[&Assign TF01 = "(" +
quote+ABC01+quote+")":proval:text]
[&Assign TF02 = "length("+quote+TF01+quote+")":proval:number:whole]
[&If TF02=0]
[&Show ABC:1]
[&EndIf]
This uses the very useful proval modifier (which we will cover in more detail in a later Tip) to both read the content of the field and calculate how many characters are in it. It will return the value of zero to TF02 when the field ABC01 is either Blank or NULL.
This code is also useful when you have a script that you might run directly or from another script , see