Avatar Digital Publishing Solutions

412-921-7747
Fax: 412-921-4664
Email: info@avatardps.com

Upcoming Opportunities

Untitled Document
webinar
webinar

Monthly RSS Newsletter

No Spam - Powered By MailChimp

Avatar Updates

Follow Avatar DPS

Joe’s Tips: Xdata InData User Interface

April 10th, 2009 by jmathia

Sorry, it’s been a bit since my last post.  Been busy!

Anyhow, sometimes it can be useful to solicit input from the user as a prototype is running.  For example, this question recently came in:

How would I go about creating an interface with InData that would allow a user to choose a master page style as the document is being built?

The solution that Xdata and InData offer is to use the «ask» statement to query the user.  The «ask» statement pops up a dialog with whatever text you specify and an imput box.  You use the «put it into myVariable» statement to capture what the user enters.

So, you could do something like:

«ask “Please enter the name of the desired Master Page”¶
«put it into myMasterName¶
«set firstmaster of this page to myMasterName¶

You can also provide a default response in the ask dialog:

«ask “Please enter the name of the desired Master Page” with “A-Master A”¶

One limitation is that you’re limited to 3 lines of text in the ask dialog.  But, you can be fancy with constructing your 3 lines.  You can either let the lines simply wrap, if your question is very long, or, you can do things like:

«put “how many” & return & “lines can” & return & “I do” & return & “I do” into myText¶
«ask myText with “only 3″¶

Or :

«ask  ”how many” & return & “lines can” & return & “I do”  & return & “I do” with “I said, ONLY THREE!!!”¶

Note that both of the above examples should have created 4 lines in the dialog, but the last line was not placed because it wouldn’t fit.

Also note that, since the prototype begins again from the top with every record (unless you are looping through records within the body of your prototype), the Ask dialog will pop up with every record.  You can control this with a conditional:

«if recordnumber(true) = 1¶
    «ask “Which characters indicate a new book?” with “E,I,J”¶
    «put it into newList¶
    «ask “How many digits will be in the Order Number?” with “9″¶
    «put it into OrdrNbrLngth¶
«endif

The above would ask only once, at the beginning of the prototype.  Or, you could set other conditions.  The following, for example, would query only when it was detected that you were now on a different page:

«if paginfo(3) <> myStoredPageInfo¶
     «put  pageinfo(3) into myStoredPageInfo¶
     «ask “Please enter the name of the desired Master Page”¶
     «put it into myMasterName¶
     «set firstmaster of this page to myMasterName¶
«endif¶

So, if you need to user-provided information to make your prototype smarter, don’t be afraid to «ask…».

Product Databases: Getting it right

March 17th, 2009 by Coletta Perry

A key principal of any database is correct structure so that the interrelationships between the information stored therein is apparent and can be leveraged to good advantage.

These days I find myself working with more and more people and companies who, especially in this economic climate, are working on setting up their own product management databases for the purpose of populating websites and catalogs.  In most product lines there is a natural grouping or family that is often overlooked. Think multiple sizes or colors or packaging variations. Not taking these interrelationships into account is the the single most common mistake we encounter.
The tendency is to create a very flat database structure with the “base element” being the individual SKU. In so doing many such databases then require duplication of data across SKUs that share a lot of characteristics. This duplication leads to the inevitable situation where some related SKU descriptions, and most notably pricing, fail to get updated when changes occur.
This structure also makes it more difficult to market effectively and suggestively on the web and in print.

This is especially true when it comes to optimizing catalog publishing using any of a host of database publishing plugins. They all depend on “clues” to tell them which products belong together. For instance, which products should share a single picture and/or description and which bits of differentiating information should be listed separately in a list or table?
The best way to address this shortcoming is to use a basic relational database model that involves at the very least two tables:

  1. The Parent. This is the table that contains the main product group or family information — the content that is common to one or more items. Typically this would include the main product name, base description, some of the product attributes, and possibly pictures or diagrams that are representative of the whole group of SKUs. This is also the record where you might store or attach key indexing or categorization information. Sometimes there is a “base product number” that is common to all of the related SKUs. If so, then this is another bit of data that should be captured in this record. If your product line is such that all of the individual SKUs share the same price, then put the price in the parent record. This, and all database tables, should include a field for the unique record ID which is often referred to as the key field.
  2. The Child. This is the table that contains the individual SKU or line items that may be differentiated by a whole host of details such as packaging, sizes, colors, finishes. This table would contain fields for the product number, the price, as well as these differentiators. It also would contain the parent record ID. This is the “key” to how these child records get correctly related to their parent record. Think of it as something akin to a last name that no one else besides your brothers, sisters, and parents share with anyone else.

Setting up your product database using this structure will not only help avoid lots of copy-and-pasting of duplicate data, it will actually give you a critical leg up when setting up your product website or trying to automate your print catalog pages using database plugins.

Joe’s Tips: Xdata InData Alternate Line Shadings (with a twist)

March 9th, 2009 by jmathia

This weeks question (thanks again to David B!) is:


I am using the mod function:
«if recordnumber(true) mod 2 =1¶
to have every other line appear with a grey rule behind

I want to have the first item on each page to appear without the rule.  How can I achieve this?


There are a couple of ways that you an go about this.  Either way, if you want the first line of each page to be unshaded, it is best to not base the mod calc on the value of recordnumber(true) (unless you are certain that you will always have an even number of lines on each page).  Instead, set up a counter and base your mod calc on the value of the counter.

 If you know the number of lines that will fit on a page, it’s easy.  Simply break the page and re-set the counter when a target number is hit.  For example, if you know that 49 lines will fit:


«–set the initial counter¶
«if recordnumber(true) = 1¶
   «put 1 into lineCounter¶
«endif¶
«if lineCounter mod 2 = 1¶
this line is white¶
«else¶
this line is gray¶  –use a grey rule above, suitably thick and offset
«endif¶
«put lineCounter + 1 into lineCounter¶
«if lineCounter = 50¶
   «–put a page break character here!¶
    «put 1 into lineCounter¶
«endif¶

If you don’t know how many lines might fit on a page, then you can use pageinfo() to find out when a page changes by comparing the current value against a stored value, and re-setting your counter whenever the page changes.

«–get and store the initial pageinfo value, set a counter¶
«if recordnumber(true) = 1¶
   «put pageinfo(3) into myPageInfo¶
   «put 1 into lineCounter¶
«endif¶
this line«¶  –set your fields, but don’t set a return on the page
«–now get pageinfo.  If it has changed, re-set the stored value and the counter¶
«if pageinfo(3) <> myPageInfo¶
   «put pageinfo(3) into myPageInfo¶
   «put 1 into lineCounter¶
«endif¶
«if lineCounter mod 2 = 1¶
 is white¶  –here, all you really need is a paragraph return
«else¶
 is gray¶   –here, the paragraph return needs to carry the gray rule
«endif¶
«put lineCounter + 1 into lineCounter¶

Note that with this technique, it is safest to get the value of pageinfo() AFTER you have set some text.  If you test before setting any text, you might be on the prior page when the pageingo value is gathered, giving you an incorrect result.

Make sense? 



April in Dallas - EasyCatalog Training

February 27th, 2009 by Chris Martin

Avatar DPS’s next EasyCatalog training class will be April 21-23, 2009 in Dallas, TX. Call 412-921-7747 or email info@avatardps.com for more information.

Course Description Starts Ends
EasyCatalog I Page Building and Basic Template Design 9:00 a.m.
Tuesday, April 21
Noon
Wednesday, April 22
EasyCatalog II Advanced Template Design and Pagination Rules 1:00 p.m.
Wednesday, April 22
4:30 p.m.
Thursday, April 23
EasyCatalog

EasyCatalog dramatically shortens page production time and ensures that your documents are accurately linked to your data. EasyCatalog transforms Adobe InDesign from a page layout program into a true publishing powerhouse. In the past, to get this kind of power in a desktop-level product has been almost impossible at any price. Now, you can produce brochures, catalogs and other marketing materials far more efficiently and eliminate countless hours of proofing, rework and data validation.

Avatar has worked extensively with EasyCatalog for over four years as a preferred reseller, trainer and integrator in North America. We’ve been incredibly impressed with this software, but even more impressed by the software’s developers. They really understand how publishing automation should work, and they are focused totally on providing tools to end-users that are elegantly simple and bullet-proof.

EasyCatalog has opened up a whole new world of publishing power to desktop users. Avatar has been able to deliver robust solutions quickly and affordably by integrating EasyCatalog with a variety of content management systems, resulting in excellent return on investment for our customers.

Joe’s Tips: Xdata InData using “Put Styled”

February 27th, 2009 by jmathia

A recent Em Software inquiry asked:

I have a question about the “Xpress Tags” supporting. Can I use the this statement (E.g. : <<put styled @style1:<<a>>>>)?  Any example for me please ? 

The «put styled…» statement can be very powerful.  It causes Xdata or InData to interpret formatting tags within a field’s data.  Generally, the put styled statement expects that the tags will be in the actual data file being imported.

So, if I have a field named myField which contains “that is one <B>BIG</B> dog!”, then the statement

«put styled myField»

will set “that is one BIG dog”.

Tags can be valid XPress tags, InDesign tags, or Xtags.

However, you can also have literal tags in a put styled statement.  This can be handy, for example, if you are concatenating strings from multiple fields or variables.

The trick is to surround the tags with double quotes, and to concatenate them with the variable data portion of the statement.  For example, lets say that I have a variable named myText (containing “Really”) and a field named “field1″ (containing “this is pretty cool!”).  You could then do something like (using InDesign tags here):

«put styled “<ct:Italic>” & myText & <ct:> && field1»

This would produce:

Really this is pretty cool!

(note that the double ampersand adds a space when concatenating–”this && that” is equivalent to “this & ” ” & that”)

You should also be able to use character and paragraph styling tags, as well, as long as they are valid formatting tags.  You cannot, however, use put styled to interpret object-building Xtags (that create text or pic boxes, for example).

Hope you find this useful!