News Ticker

I downloaded the New Ticker database from the sandbox and I would like to modify how it works, ever so slightly.

The database looks into a view and pulls a text field in the second column.

I would like to create a default message when there are no documents in the view. I do not want to create a default document for that view.

Is there a way to determine if a view is empty in formula language?

Here is the code I have tried in a computed field:

defaultmessage:=“"”+“No reported outages, all systems are available”+“"”;

notice:=“"” + @Implode(@DbColumn( “” : “NoCache” ; “”:“” ;“V_NT_ENTRIES” ;2 );“","”) + “"”;

@IF(notice=" "; defaultmessage; notice)

What did I do wrong?

Subject: News Ticker

If @DbColumn isn’t returning any entries, then You should look for a null-string. You have a space incorrectly placed in the @if-statment:

@If(notice=" ";defaultmessage;notice)

should instead be:

@If(notice=“”;defaultmessage;notice)

but another way to solve it would be too look for the number of elements returned by the @DbColumn:

tmpList := @DbColumn(“”:“NoCache”;“”:“”;“V_NT_ENTRIES”;2)

@If(@Elements(tmpList) = 0;defaultmessage;@Implode(tmpList;“","”))

hth