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.