Thursday, December 11, 2008

Genie: Specifying the number of Items to appear on the Catalog (or OPAC) Full Display page

This is rather basic, but I see lots of questions about it.

Out-of-the-box, the Catalog Full Display page will show 100 Items records in the Item Information section. To change this value, use the MaxItems= parameter on the CatalogFull (and/or OpacFull) report in MyReports.config. For example:

<!-- CatalogFullReport -->
<inmg:Report Name="CatalogFull" ShowItemInfo="true" ShowBorrowerInfo="true" ShowReserves="true" ShowEditReserveLink="true" ShowEditItemLink="true" MaxItems="10">
<Field Name="CatTitle" Header="&lt;b&gt;" Footer="&lt;/b&gt;" Separator="&lt;br&gt;"/>
<Field Name="CatSubtitle" Separator="&lt;br&gt;"/>
...

Note: Remember to click Reset on the About Genie window after making this change.

Thursday, November 20, 2008

Genie: Specifying the sort in the Item Information, etc. sections

In the Catalog and OPAC full reports, the method for specifying the sort order in the <Item Information>, <Serial Information>, etc. sections is different than specifying sort order elsewhere. Instead of putting Reverse="true" on the <Field> tag, you use a minus sign (-) before the field name in the SortBy= line, as shown in the example below, which sorts by ItemLocation, then subsorts by ItemIssue in descending order.

<!-- Sample configuration for Item, Loan, Reserve, and serial information -->
<ItemInfo Heading="Item Information" ShowItemNumber="true" SortBy="ItemLocation|-ItemIssue" >
<Field Name="ItemLocation" Footer=": "/>
<Field Name="ItemIssue" Header="[" Footer="], " />
<Field Name="ItemCopyInfo" Footer=", "/>
<Field Name="ItemBarCode"/>
<Field Name="ItemSubLocation" Header=", "/>
<Field Name="ItemShelf" Header=", " Footer=" " NoContentHeader=" "/>
<Field Name="ToCFileName.ItemToCID" Header="" Footer=" " NoContentHeader=" " TreatAs="ToCIcon"/>
</ItemInfo>
<LoanInfo>
<Field Name="BorrName.LoanBorrID" Header=" - on loan to " Footer=", " NoContentHeader=" - on loan, "/>
<Field Name="LoanDateDue" Header="due " NoContentHeader="permanent loan"/>
</LoanInfo>
<ReserveInfo Heading="Reserves" ShowItemNumber="true">
<Field Name="ResDateRequested" Footer=", "/>
<Field Name="BorrName.ResBorrID" Header="by "/>
<Field Name="ResLocation" Header=", at location "/>
<Field Name="ResItemBC" Header=", for item "/>
</ReserveInfo>
<SerialInfo Heading="Serials" ShowItemNumber="true">
<Field Name="SerDatesRecd" UseFunction="FirstEntry" Header="Latest issue received: " Footer=". "
NoContentHeader="No issues received. "/>
</SerialInfo>
<!-- -->

Thursday, October 16, 2008

DB/TextWorks: simple Form Script to populate field with user name

The script below puts the user's Windows login name in a specific form box when the user creates a New Record using the edit form containing the script.

function onRecordNew()
{
var WSHNetwork = new ActiveXObject("WScript.Network");
var szLoginName = WSHNetwork.UserName;
Form.boxes("boxEnteredBy").content = szLoginName;
}

The only other step is to ensure that you call the box you want populated with the user's login name "boxEnteredBy" on the Names tab of the Form Script dialog box.

This script requires that Windows Script Host be installed on the user's machine.

You can also have a substitution list on the field that transforms the login name to a prettier form of the name.

E.g., a subtitution list entry might look like:

lweiss:Lisa Weiss

Thursday, October 2, 2008

WebPublisher PRO: New Search shows query criteria

Question: If I click the New Search button on the search results page, when I return to the query screen, my previous query criteria still appear. How do I eliminate this behavior so the query boxes are empty when I click New Search?

Answer: Edit the HTML query screen and remove the following line:

<input id="QS" type="hidden" value="query screen name" name="QS">

Thursday, August 28, 2008

Genie: Permitting the Order Date to be edited on the Edit Order page

Out-of-the-box, the Order Date box on the Edit Order page is read-only.

If you would like to permit users to edit the Order Date, to change it to another date, edit MyEditScreens.config, and change this line:

<Field Name="OrdDateOrdered" Type="TextBox" CssClass="orders_edit_onethird_readonly" ShowBrowse="false" Required="false" Width="232" Align="left" ReadOnly="true"/>

To say this:

<Field Name="OrdDateOrdered" Type="TextBox" CssClass="orders_edit_onethird_textinput" ShowBrowse="false" Required="false" Width="232" Align="left" />

The changes were to remove ReadOnly="true" and change the CssClass=.

Remember to change the line in both the orders_item_edit and orders_serial_edit screens.

Thursday, August 14, 2008

WebPublisher PRO: XML queries using saved sets

Occasionally you may want to submit an XML query that uses a set saved in the textbase.

The following will search for a saved set. The <QY> is just the standard Command Query syntax to find a saved set. Note that it does not refresh the set; the records are the records that were in the set the last time it was saved. This is essentially like using Load Set in TextWorks.

<?xml version="1.0" ?>
<Query xmlns="
http://www.inmagic.com/webpublisher/query" detail="qy">
<AC>QUERY</AC>
<QY>find {automation}</QY>
<XM>1</XM>
<TN>CARS</TN>
</Query>

If you want to refresh the set so that the search will retrieve the records added since the set was last saved, use a Menu Query, like so:

<?xml version="1.0" ?>
<Query xmlns="
http://www.inmagic.com/webpublisher/query" detail="qy">
<AC>menu_query</AC>
<SN>automation</SN>
<XM>1</XM>
<TN>cars</TN>
</Query>

Thursday, August 7, 2008

Genie: adding red Reserves asterisk to other Loans reports

The Loans Renewal report shows a red asterisk next to titles that have one or more active Reserves.

You can apply this feature to other Loans reports, as well.

To do so, edit MyReports.config and add the following line where you want the red asterisk to appear in the report.

<Field UseFunction="IsActiveReserve" Style="Color:Red"/>

The IsActiveReserve function requires that the report also include the LoanItemBC and LoanCatID fields. If these fields are not already included in the report, and you do not want them to appear in the report, use the Visible="false" setting to hide them.

<Field Name="LoanItemBC" Visible="false"/>
<Field Name="LoanCatID" Visible="false"/>

Note: Including IsActiveReserve can slow down the speed of report display since determining whether to display the red asterisk requires searching Reserves for each record in the report.