Andornot Consulting Inc.
Home Page
Home Page
 |  | 

Thursday, July 31, 2008

Genie labels and query constraints

The default myLabels.config file for Inmagic Genie comes with a section that can be uncommented out to also include Item specific information, ie. for the Gaylord Label form

<!-- Sample Configuration for Item Fields
<ItemInfo>
<Field Name="ItemVolume" Header="&lt;br&gt;"/>
<Field Name="ItemIssue" Header="&lt;br&gt;"/>
</ItemInfo>
-->

We ran across an interesting situation recently where the client has multiple offices and currently location information is just in the Catalog records.   Only a couple of the offices will will be printing label sets  and these offices will start populating Item records for new material.    They have set the Query Filter on in their myGenie config file with a cookie to keep the last used setting, as they usually only want to see their own holdings. 

We were testing printing the labels and at first everything worked fine but we needed to move the labels over and adjust the fields shown, so we started making some changes to their myLabels config file. Then they started getting a completely blank screen when displaying the record labels from the InfoCart for printing.  I could not replicate the problem and nor could Inmagic Support so we were temporarily baffled.

The cause turned out to be the ItemInfo section that I had uncommented out to allow them to print additional item specific location information on the spine label.  However we were testing printing with existing records in the Catalog (ie. with no Item records) and the client had started using using the Query filter. If using a Query filter and a label form with an ItemInfo section, then records must have an Item record with an ItemLocation field.  If they do not, a blank page results.

The solution for this client, for the moment at least, is to have two separate label forms and choose which one to use accordingly.   One for printing labels for existing records that only have data in the catalog, and one for labels for new records that will also have item information. This is easy to do in just a few steps:

  • open the myLabels config file and copy the existing Gaylord label code and paste it just below the original
  • rename Label Name="Gaylord" to Label Name="Gaylord for Items" in this copied section
  • make sure to comment out the ItemInfo code on the original Gaylord label, and uncomment it on the new Gaylord for Items label
  • Open myGenie config and add in a reference to the extra label to the <!-- Actions exposed to library staff in the Catalog InfoCart --> section, ie.
    • <Action Name="Gaylord for Items" Display="Print Labels (Items)" Type="Label" />
  • Reset the Genie application from the About Genie screen.

Monday, July 21, 2008

Changing Inmagic Genie dropdown lists to text boxes

Several edit screens in Genie use dropdown lists,for example, Payment Methods, Order Types, Currencies etc. The wording for these can be edited in the myGenie.config file, eg.

<!-- PaymentMethods -->
<PaymentMethods>
   <Method Default="true">Credit Card</Method>
   <Method>Check</Method>
   <Method>Money Order</Method>
   <Method>Gift Card</Method>
   <Method>Wire Transfer</Method>
</PaymentMethods>

However some clients may not be used to having this type of information validated, or their existing data to be converted into Genie may have a variety of values that cannot be easily batch modified to fit.  In this case it is possible to change the edit screen and switch to a simple textbox and if required, add a link to browse a validation list instead.

In myEditScreens.config file change this:

<Field Name="OrdPaymentMethod" Type="DropDownList" CssClass="orders_edit_qtr_textinput"  ShowBrowse="false" Required="false" Width="170"/>

To:

<Field Name="OrdPaymentMethod" Type="TextBox" CssClass="orders_edit_qtr_textinput"  ShowBrowse="true" Required="false" Width="170"/>

Dropdowns that should not be changed are CatSerFrequency (as this is used to set up arrival patterns in Serials using the calculation values specified in the myGenie config file); and the Suppliers dropdown in Orders (needed to show the linked Supplier name rather than the OrdSuppID). A good rule is to always make a backup before changing any config file setting.

Monday, July 07, 2008

Inmagic DB/TextWorks and Vista Virtualization

This post is a follow-up to Peter's post Inmagic WebPublisher PRO and Vista Virtualization, but specifically pertaining to DB/TextWorks. 

I recently had a client who created and added a bunch of records to a new textbase located in a folder under Program Files on her Vista-installed laptop.  When it came time to move the textbase off her laptop onto another computer she zipped up all the textbase files, copied the zip file to her thumb drive and prepared to unzip the files onto the other machine.  With files unzipped on the other machine (an older XP-installed desktop computer), she enthusiastically went to show off her newly created and populated textbase. 

Much to her surprise DB/TextWorks produced a disheartening message indicating that the textbase was empty.  How could this be, she had 170 records in the textbase when it was on her laptop and she had copied every textbase file from the correct folder on her laptop.  I got involved and we looked this way and that way - on both machines - and there was nothing that we could see that could indicate that the textbase could possibly be empty (the .btx, .dbt and .occ files were rather large).

The ah ha moment came when Kathy suggested that Peter had posted something about this on our Blog - back in March 2008 (see above link).  I had skipped over that posting because it had referenced WebPublisher, but in fact it told me exactly what I needed to know.  To change the text and code slightly from what Peter posted:

For instance, say DB/TextWorks indicates that a textbase is located at:

%Program Files%\Inmagic\Textbases

Vista detects that DB/TextWorks does not have permission to save to that location and copies the file to:

%Users%\<your account>\AppData\Local\VirtualStore\Program Files\Inmagic\Textbases

Subsequent read/write operations access the VirtualStore version of the file, even though DB/TextWorks will still think it is accessing the Program Files directory. Poor deluded DB/TextWorks.

It took about 1 minute to find the database files in the VirtualStore location - thank you Peter! - however, there was more, or in this case less, to come!  Two of the essential files were missing.  They were the .tba file and the .sdo file.  Why those two? Who knows?  However, combining the new found files (.acf, .btx, .dbo, .dbr, .ixl, .log, and .occ)  from the VirtualStore location with the .tba and the .sdo file from the presumed location – under Program files, allowed us to complete the textbase and transfer it to another location. 

The lesson learned here:

  • On a Vista machine DO NOT install textbases under Program files. 

And a Note: 

  • this problem only occurs with Vista's UAC (user account control) turned on.

Labels: ,