Wednesday, July 2, 2014
Formatting datetime datafields in CoolSign Content Creator
When using the current datetime or Data table datetime values for digital signage content in Haivision's CoolSigns Content Creator software, the following DateTime string patterns can be used:
MM/dd/yyyy - 08/22/2014
dddd, MMMM dd yyyy - Tuesday, July 01 2014
dddd, MMMM d yyyy HH:mm - Tuesday, July 1 2014 06:30
dddd, MMMM dd yyyy hh:mm tt - Tuesday, July 01 2014 06:30 AM
dddd, MMMM d yyyy H:mm - Tuesday, July 1 2014 6:30
dddd, MMMM dd yyyy h:mm tt - Tuesday, July 01 2014 6:30 AM
ddd, MMM d yyyy h:mm tt - Tues, Jul 1 2014 6:30 AM
dddd, MMMM d yyyy HH:mm:ss - Tuesday, July 1 2014 06:30:07
MM/dd/yyyy HH:mm - 08/22/2014 06:30
MM/dd/yyyy hh:mm tt - 08/22/2014 06:30 AM
MM/dd/yyyy H:mm - 08/22/2014 6:30
MM/dd/yyyy h:mm tt - 08/22/2014 6:30 AM
MM/dd/yyyy HH:mm:ss - 08/22/2014 06:30:07
In the Expression builder, the following javascript syntax can be used to format the datetime value:
return FormatDateStr(GetValueEx("localstart",rowindex,timeoffset,""),"h:mm tt")
If - Else statement in CoolSigns Datafield Expression
When using Data tables to add dynamic data to digital signage content in Haivision's CoolSign Content Creator software, it's important to know that the Expression builder editor excepts most javascript syntax. If - Else statements are permitted, below is an example:
if (GetValueEx("location",rowindex,timeoffset,"").indexOf("Away") > -1)
return "Away Game"
else
return "Home Game"
This example checks the value of "location" and assigns a value to the datafield based on that value.
if (GetValueEx("location",rowindex,timeoffset,"").indexOf("Away") > -1)
return "Away Game"
else
return "Home Game"
This example checks the value of "location" and assigns a value to the datafield based on that value.
Wednesday, April 16, 2014
Multiple if conditions in a Crystal Reports Record Selection
When using multiple If statements in a Crystal Reports Record Selection, use parentheses to group your if-then-else statements. These need to be terminated with an Else. If no else exists in your logic, use Else True. Multiple If statements are then separated using an And or Or as seen in the example below:
{TERM} = {?Term} And
{INSTITUTION} = {?Institution} And
(
If ({?Organization} <> "%") Then
{ACAD_ORG} = {?Organization}
Else True
)
And
(
If ({?Dual Enrollment} = "N") Then
{HS_DUAL_ENROLL} = "N"
Else If ({?Dual Enrollment} = "Y") Then
{HS_DUAL_ENROLL} = "Y"
Else True
)
Labels:
Crystal Reporting
Thursday, February 20, 2014
Updating SharePoint Ribbon Styles and Markup Styles
The SharePoint 2010 Ribbon contains default styles and elements in their Styles and Markup Styles sections. Using CSS, you can add styles or elements as well as hide OOTB styles and elements.
To create new items, use the ms-rteElement or ms-rteStyle prefixes in your CSS file.
H2.ms-rteElement-H2Custom
{
-ms-name:Title;
color:#008C99;
background-color:transparent;
}
.ms-rteStyle-Normal
{
-ms-name:"Normal";
font-size:10pt;
font-weight:normal;
background-color:transparent;
}
To remove the Styles button entirely:
#Ribbon\.EditingTools\.CPEditTab\.Styles
{
display:none;
}
To remove a single element from the Markup Styles list (Change the ElementWithStyle index number to hide the element based on its order in the list.):
li.ms-cui-menusection-items a#ElementWithStyle0-Menu
{
display:none;
}
li.ms-cui-menusection-items a#ElementWithStyle1-Menu
{
display:none;
}
To create new items, use the ms-rteElement or ms-rteStyle prefixes in your CSS file.
H2.ms-rteElement-H2Custom
{
-ms-name:Title;
color:#008C99;
background-color:transparent;
}
.ms-rteStyle-Normal
{
-ms-name:"Normal";
font-size:10pt;
font-weight:normal;
background-color:transparent;
}
To remove the Styles button entirely:
#Ribbon\.EditingTools\.CPEditTab\.Styles
{
display:none;
}
To remove a single element from the Markup Styles list (Change the ElementWithStyle index number to hide the element based on its order in the list.):
li.ms-cui-menusection-items a#ElementWithStyle0-Menu
{
display:none;
}
li.ms-cui-menusection-items a#ElementWithStyle1-Menu
{
display:none;
}
Thursday, January 30, 2014
Using rowspan, colspan and nested tables
Below is an example of constructing an HTML table using rowspan, colspan and nesting tables in a cell.
| Enrollment Services | Finances | Take a Placement test |
| ||||
| Become a Student | How to Make a Payment | Meet with an Advisor | |||||
| How to Make a Loan Payment | |||||||
<table border="1" cellpadding="10">
<tr>
<td>Enrollment Services</td>
<td>Finances</td>
<td>Advising</td>
<td rowspan="4">
<table border="1" cellpadding="5">
<tr>
<td>Testing Center</td>
</tr>
<tr>
<td>New Student Orientation</td>
</tr>
<tr>
<td>New Student Orientation</td>
</tr>
<td>New Student Orientation</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>Become a Student</td>
<td>Enroll in a Class</td>
<td>Meet with an Advisor</td>
</tr>
<tr>
<td colspan="2">How to Make a Loan Payment</td>
<td> </td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
</table>
Wednesday, December 11, 2013
Using VLOOKUP function with datasource query in Excel
When using the VLOOKUP function on a table array with data returned from a data source query, I found it necessary to explicitly convert my lookup value to a text value. Failing to do so normally resulted in a error.
=VLOOKUP(TEXT(A1,0),Table_Query_from_My_Data_Source,2,FALSE)
=VLOOKUP(TEXT(A1,0),Table_Query_from_My_Data_Source,2,FALSE)
Thursday, October 24, 2013
SharePoint Custom List web part template
A recent project involved adding the same navigation links to a couple of SharePoint blog sites. The navigation links must appear on the default.aspx, categories.aspx and post.aspx pages. Using a custom list in the parent site, we created a web part using SP Designer. Now, if we need another navigation web part for another set of blogs, we can simply export the web part and make the necessary changes. Below is the content of web part. Included is the xml definition of the view as well as the xsl to create the links.
<?xml version="1.0" encoding="utf-8" ?>
<webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
<metaData>
<type name="Microsoft.SharePoint.WebPartPages.XsltListViewWebPart, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<importErrorMessage>Cannot import this Web Part.</importErrorMessage>
</metaData>
<data>
<properties>
<property name="InitialAsyncDataFetch" type="bool">False</property>
<property name="ChromeType" type="chrometype">None</property>
<property name="Title" type="string" />
<property name="Height" type="string" />
<property name="CacheXslStorage" type="bool">True</property>
<property name="XslLink" type="string" null="true" />
<property name="AllowZoneChange" type="bool">True</property>
<property name="AllowEdit" type="bool">True</property>
<property name="XmlDefinitionLink" type="string" />
<property name="DataFields" type="string" />
<property name="Hidden" type="bool">False</property>
<property name="ListName" type="string">{37683D39-B11D-4E11-8B1C-8C5421EDB458}</property>
<property name="NoDefaultStyle" type="string">TRUE</property>
<property name="ListDisplayName" type="string" null="true" />
<property name="AutoRefresh" type="bool">False</property>
<property name="ViewFlag" type="string">8388621</property>
<property name="AutoRefreshInterval" type="int">60</property>
<property name="AllowConnect" type="bool">True</property>
<property name="Description" type="string" />
<property name="AllowClose" type="bool">True</property>
<property name="ShowWithSampleData" type="bool">False</property>
<property name="ParameterBindings" type="string"></property>
<property name="EnableOriginalValue" type="bool">False</property>
<property name="CacheXslTimeOut" type="int">86400</property>
<property name="WebId" type="System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">ef069fb2-2b0b-4c00-ad1f-231d5485f963</property>
<property name="ListUrl" type="string" null="true" />
<property name="DataSourceID" type="string" />
<property name="FireInitialRow" type="bool">True</property>
<property name="ManualRefresh" type="bool">False</property>
<property name="ViewFlags" type="Microsoft.SharePoint.SPViewFlags, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">Html, TabularView, Hidden, Mobile</property>
<property name="ChromeState" type="chromestate">Normal</property>
<property name="AllowHide" type="bool">True</property>
<property name="PageSize" type="int">-1</property>
<property name="SampleData" type="string" null="true" />
<property name="BaseXsltHashKey" type="string">/_layouts/xsl/vwstyles.xsl;#12/13/2011 02:25:36;#0;#/_layouts/xsl/fldtypes.xsl;#03/26/2010 21:24:40;#0;#/_layouts/xsl/fldtypes_Ratings.xsl;#03/14/2012 11:19:12;#0;#/_layouts/xsl/fldtypes_docicon.xsl;#09/07/2011 11:41:41;#0;# 1 100 14.0.6120.5000</property>
<property name="AsyncRefresh" type="bool">False</property>
<property name="HelpMode" type="helpmode">Modeless</property>
<property name="ListId" type="System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">37683d39-b11d-4e11-8b1c-8c5421edb458</property>
<property name="DataSourceMode" type="Microsoft.SharePoint.WebControls.SPDataSourceMode, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">List</property>
<property name="AllowMinimize" type="bool">True</property>
<property name="TitleUrl" type="string">/XXXXX/XXX/Lists/Navigation</property>
<property name="CatalogIconImageUrl" type="string" />
<property name="DataSourcesString" type="string" />
<property name="PageType" type="Microsoft.SharePoint.PAGETYPE, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">PAGE_NORMALVIEW</property>
<property name="DisplayName" type="string">All Items</property>
<property name="UseSQLDataSourcePaging" type="bool">True</property>
<property name="Width" type="string" />
<property name="ExportMode" type="exportmode">All</property>
<property name="Direction" type="direction">NotSet</property>
<property name="ViewContentTypeId" type="string">0x</property>
<property name="HelpUrl" type="string" />
<property name="XmlDefinition" type="string">
<View Name="{E9A835C7-4605-41BD-AA5E-50D9799DE2C9}" MobileView="TRUE" Type="HTML" Hidden="TRUE" DisplayName="All Items" Url="/academic-affairs/AFA/SitePages/Untitled_12.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/images/generic.png">
<Query/>
<ViewFields>
<FieldRef Name="LinkTitle"/>
<FieldRef Name="URL"/>
<FieldRef Name="Title" Explicit="TRUE"/>
</ViewFields>
</View>
</property>
<property name="Xsl" type="string">
<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal" xmlns:o="urn:schemas-microsoft-com:office:office" ddwrt:ghost="show_all">
<xsl:template match="dsQueryResponse" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:o="urn:schemas-microsoft-com:office:office" ddwrt:ghost="" xmlns:ddwrt2="urn:frontpage:internal" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime">
<div class="AFANavigation"><xsl:apply-templates select="/dsQueryResponse/Rows/Row"/></div>
</xsl:template>
<xsl:template match="Row">
<xsl:choose>
<xsl:when test="substring(@URL,2,3) = 'a h'">
<xsl:variable name="link" select="substring-after(substring-before(@URL,'&lt;/a&gt;'),'&gt;')"/>
<div><a href="{$link}"><xsl:value-of select="@Title"/></a></div>
</xsl:when>
<xsl:otherwise>
<div><a href="{@URL}"><xsl:value-of select="@Title"/></a></div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
</property>
<property name="Default" type="string">FALSE</property>
<property name="TitleIconImageUrl" type="string" />
<property name="MissingAssembly" type="string">Cannot import this Web Part.</property>
<property name="SelectParameters" type="string" />
</properties>
</data>
</webPart>
</webParts>
<?xml version="1.0" encoding="utf-8" ?>
<webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
<metaData>
<type name="Microsoft.SharePoint.WebPartPages.XsltListViewWebPart, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<importErrorMessage>Cannot import this Web Part.</importErrorMessage>
</metaData>
<data>
<properties>
<property name="InitialAsyncDataFetch" type="bool">False</property>
<property name="ChromeType" type="chrometype">None</property>
<property name="Title" type="string" />
<property name="Height" type="string" />
<property name="CacheXslStorage" type="bool">True</property>
<property name="XslLink" type="string" null="true" />
<property name="AllowZoneChange" type="bool">True</property>
<property name="AllowEdit" type="bool">True</property>
<property name="XmlDefinitionLink" type="string" />
<property name="DataFields" type="string" />
<property name="Hidden" type="bool">False</property>
<property name="ListName" type="string">{37683D39-B11D-4E11-8B1C-8C5421EDB458}</property>
<property name="NoDefaultStyle" type="string">TRUE</property>
<property name="ListDisplayName" type="string" null="true" />
<property name="AutoRefresh" type="bool">False</property>
<property name="ViewFlag" type="string">8388621</property>
<property name="AutoRefreshInterval" type="int">60</property>
<property name="AllowConnect" type="bool">True</property>
<property name="Description" type="string" />
<property name="AllowClose" type="bool">True</property>
<property name="ShowWithSampleData" type="bool">False</property>
<property name="ParameterBindings" type="string"></property>
<property name="EnableOriginalValue" type="bool">False</property>
<property name="CacheXslTimeOut" type="int">86400</property>
<property name="WebId" type="System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">ef069fb2-2b0b-4c00-ad1f-231d5485f963</property>
<property name="ListUrl" type="string" null="true" />
<property name="DataSourceID" type="string" />
<property name="FireInitialRow" type="bool">True</property>
<property name="ManualRefresh" type="bool">False</property>
<property name="ViewFlags" type="Microsoft.SharePoint.SPViewFlags, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">Html, TabularView, Hidden, Mobile</property>
<property name="ChromeState" type="chromestate">Normal</property>
<property name="AllowHide" type="bool">True</property>
<property name="PageSize" type="int">-1</property>
<property name="SampleData" type="string" null="true" />
<property name="BaseXsltHashKey" type="string">/_layouts/xsl/vwstyles.xsl;#12/13/2011 02:25:36;#0;#/_layouts/xsl/fldtypes.xsl;#03/26/2010 21:24:40;#0;#/_layouts/xsl/fldtypes_Ratings.xsl;#03/14/2012 11:19:12;#0;#/_layouts/xsl/fldtypes_docicon.xsl;#09/07/2011 11:41:41;#0;# 1 100 14.0.6120.5000</property>
<property name="AsyncRefresh" type="bool">False</property>
<property name="HelpMode" type="helpmode">Modeless</property>
<property name="ListId" type="System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">37683d39-b11d-4e11-8b1c-8c5421edb458</property>
<property name="DataSourceMode" type="Microsoft.SharePoint.WebControls.SPDataSourceMode, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">List</property>
<property name="AllowMinimize" type="bool">True</property>
<property name="TitleUrl" type="string">/XXXXX/XXX/Lists/Navigation</property>
<property name="CatalogIconImageUrl" type="string" />
<property name="DataSourcesString" type="string" />
<property name="PageType" type="Microsoft.SharePoint.PAGETYPE, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">PAGE_NORMALVIEW</property>
<property name="DisplayName" type="string">All Items</property>
<property name="UseSQLDataSourcePaging" type="bool">True</property>
<property name="Width" type="string" />
<property name="ExportMode" type="exportmode">All</property>
<property name="Direction" type="direction">NotSet</property>
<property name="ViewContentTypeId" type="string">0x</property>
<property name="HelpUrl" type="string" />
<property name="XmlDefinition" type="string">
<View Name="{E9A835C7-4605-41BD-AA5E-50D9799DE2C9}" MobileView="TRUE" Type="HTML" Hidden="TRUE" DisplayName="All Items" Url="/academic-affairs/AFA/SitePages/Untitled_12.aspx" Level="1" BaseViewID="1" ContentTypeID="0x" ImageUrl="/_layouts/images/generic.png">
<Query/>
<ViewFields>
<FieldRef Name="LinkTitle"/>
<FieldRef Name="URL"/>
<FieldRef Name="Title" Explicit="TRUE"/>
</ViewFields>
</View>
</property>
<property name="Xsl" type="string">
<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal" xmlns:o="urn:schemas-microsoft-com:office:office" ddwrt:ghost="show_all">
<xsl:template match="dsQueryResponse" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:o="urn:schemas-microsoft-com:office:office" ddwrt:ghost="" xmlns:ddwrt2="urn:frontpage:internal" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime">
<div class="AFANavigation"><xsl:apply-templates select="/dsQueryResponse/Rows/Row"/></div>
</xsl:template>
<xsl:template match="Row">
<xsl:choose>
<xsl:when test="substring(@URL,2,3) = 'a h'">
<xsl:variable name="link" select="substring-after(substring-before(@URL,'&lt;/a&gt;'),'&gt;')"/>
<div><a href="{$link}"><xsl:value-of select="@Title"/></a></div>
</xsl:when>
<xsl:otherwise>
<div><a href="{@URL}"><xsl:value-of select="@Title"/></a></div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
</property>
<property name="Default" type="string">FALSE</property>
<property name="TitleIconImageUrl" type="string" />
<property name="MissingAssembly" type="string">Cannot import this Web Part.</property>
<property name="SelectParameters" type="string" />
</properties>
</data>
</webPart>
</webParts>
Subscribe to:
Posts (Atom)