Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to use scripting in InDesign from spreadsheet datamerge

Explorer ,
May 24, 2011 May 24, 2011

Hi there

I've been working on a project for a while (some of it successfully and some of it not) to figure out what scripting I would need to use in Indesign (conditional text or js) and what I would need to clarify in the spreadsheet before completing a datamerge in Indesign.

Here's my analysis and what I currently have to work with:

Scenario:

  • I have a listing for a hostel (300+ actually) and in each record we display the room types for each hostel.  They are single, double, twin, dorm and share.
  • Each room type may offer a variety of up to 4 different prices.  For example,  hostel A may have a single room type offering 4 beds @ $32 & 3 beds @ $42 and 2 beds @ $45.  This can also be the same scenario for the other room types.
  • Each room type price will show in a different colour:  green for madup beds, blue for ensuite rooms, pink for madeup and ensuite (together) and black for none of the above.
  • The prices will need to range from lowest to highest for each room type configuration.

I have a large spreadsheet that displays the bed count, price and room configuration.

What knowledge I do have is that I can create character styles in InDesign, complete a datamerge and layout the template.  I intend to use the character styles for the colour coding on the room type configurations.

My problem is I don't know how to identify the different price colours and range by the fields given to me in the spreadsheet without having to manually place each room type, bed count, price and colour ID in separate columns.  This would be too manual a process.

Here is an example of what I have to work with in the spreadsheet including a hostel record for a visual.  Please note that the room config types are showing by using (m) madeup (m,e) madeup ensuite (e) ensuite. And for those room types ie Single, dorm etc that have no beds at all to offer then I need to insert a hyphen "-" only. 

I'm wondering whether someone can assist me with some logic that I may need to create in Indesign for Indesign to identify the colours and the price ranking of each room type configuration.

spreadsheet-example.gif

hostel-record.gif

I hope this makes sense.

I'd be happy to pay someone for their time to assist me with this but would need to do this off the forum of course.  I also have a very tight budget.

Thanks very much in advance.

TOPICS
Scripting
850
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 25, 2011 May 25, 2011

Hi, what do you need to script for this problem?

I think you should have a look at this

http://indesignsecrets.com/the-indesigner-episode-43-data-merge.php

I think if you layout your InDesign file correctly it shouldn't be too difficult to do the merge. I am assuming from the lower graphic in your post that that is the layout you want to employ.

I recommend you view the video in the link above and see how "easy" it is to do, even the placing of your map graphic can be done through your spreadsheet once you have a link for the image.

Regards

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 25, 2011 May 25, 2011

Hello

Thanks for your reply.

I think you may be misunderstanding my query.

I have already laid out the template and yes that image is what my layout is based on.

My problem is not how do I layout a template in Indesign and how do I merge the data, its more like "how do I clarify the data in the spreadsheet column to separate them into using conditions in Indesign".  That's the best I can describe my problem.

I explained my conundrum in my first message in this thread.

Thanks for the link.  I'll check it out.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 25, 2011 May 25, 2011

When you ask the same question in two different forums, it's a bit weird.

This started out at How to build conditional text from a data merge.

I thought you got a lot of useful advice there and were well on the way to a solution -- what went wrong? What's the problem?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 25, 2011 May 25, 2011
LATEST

Hello John

Yes, thank you for pointing that out to me.  I know where I started this question. 

I actually don't find it weird placing my question in another forum.  The reason I did this is because I found that perhaps my query is more relevant to the "scripting" forum since that is what I think my problem may be.

Yes, I did get a lot of very useful advice in the other thread and have retained that, however, as I mentioned to Peter in the other thread, I needed to get my logic right and a clearer picture of what I think I am trying to do.  I need to explore all avenues, and I have been down that line and I am still exploring and trying to find an answer.  Is that OK?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines