How to use Chili with Switch

Post Reply
manupapet
Newbie
Posts: 15
Joined: Sun Mar 04, 2012 11:08 am

How to use Chili with Switch

Post by manupapet »

Hello,



I'm trying to use Chili Publish with Switch but it don't work.

I can't find any examples of it anywhere or documentation.



Does anyone have any examples ?



Thank you



Manu
dkelly
TOP CONTRIBUTOR
Posts: 658
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

How to use Chili with Switch

Post by dkelly »

I have lots of experience with CHILI Publisher & Switch. What type of operations were you attempting?
manupapet
Newbie
Posts: 15
Joined: Sun Mar 04, 2012 11:08 am

How to use Chili with Switch

Post by manupapet »

Hello,



I have a card visit template on chili server and an excel file.

When a drag an drop an excel file, i want switch generate pdf a file by line.



I don't find exemple on goole, website enfocus or chili publish.



Could you give me an example.



Thank you





dkelly wrote: I have lots of experience with CHILI Publisher & Switch. What type of operations were you attempting?
dkelly
TOP CONTRIBUTOR
Posts: 658
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

How to use Chili with Switch

Post by dkelly »

I assume you want to pass each row of the Excel spreadsheet to CHILI as a variable?



Switch can't process an Excel spreadsheet or even a CSV file directly. So it will not be able to read rows in spreadsheet and use information to call CHILI server to generate a PDF file.



It would be possible with a custom Switch script.
manupapet
Newbie
Posts: 15
Joined: Sun Mar 04, 2012 11:08 am

How to use Chili with Switch

Post by manupapet »

Yes, I pass each rows of the excel preadsheet to chili variable.

I don't know that switch don't support excel file.

So, I try another idea.



thank you



dkelly wrote: I assume you want to pass each row of the Excel spreadsheet to CHILI as a variable?



Switch can't process an Excel spreadsheet or even a CSV file directly. So it will not be able to read rows in spreadsheet and use information to call CHILI server to generate a PDF file.



It would be possible with a custom Switch script.
dkelly
TOP CONTRIBUTOR
Posts: 658
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

How to use Chili with Switch

Post by dkelly »

With a script I wrote for convert CSV files to XML you could do something like:



manupapet
Newbie
Posts: 15
Joined: Sun Mar 04, 2012 11:08 am

How to use Chili with Switch

Post by manupapet »

Hello dkelly,



Could you send me an example xml file please



Thank you



dkelly wrote: With a script I wrote for convert CSV files to XML you could do something like:



dkelly
TOP CONTRIBUTOR
Posts: 658
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

How to use Chili with Switch

Post by dkelly »

I'd be happy to. Please send me a copy of your spreadsheet and I'll convert it for you.



Dwight Kelly

dkelly@apago.com
manupapet
Newbie
Posts: 15
Joined: Sun Mar 04, 2012 11:08 am

How to use Chili with Switch

Post by manupapet »

Here a link : spreadsheet

http://we.tl/2oPcu5WfGG

Thank you



dkelly wrote: I'd be happy to. Please send me a copy of your spreadsheet and I'll convert it for you.



Dwight Kelly

dkelly@apago.com
dkelly
TOP CONTRIBUTOR
Posts: 658
Joined: Mon Nov 29, 2010 8:45 pm
Location: Alpharetta GA USA
Contact:

How to use Chili with Switch

Post by dkelly »

OK, the CSV2XML script created 467 XML files each containing a single record.



<?xml version="1.0" encoding="UTF-8"?>

<order>

<PRENOM>SAS</PRENOM>

<NOM>NATURHOUSE</NOM>

<ADR>82 avenue Camille Pujol</ADR>

<CP>31500</CP>

<VILLE>TOULOUSE</VILLE>

<TEL>05 61 26 42 36 </TEL>

</order>





The CHILI configurator can then access the data to set variables using a Switch variable statement



[Metadata.Text:Path="/order/PRENOM",Dataset="Xml",Model=XML]


manupapet
Newbie
Posts: 15
Joined: Sun Mar 04, 2012 11:08 am

How to use Chili with Switch

Post by manupapet »

Thank you to your help.



dkelly wrote: OK, the CSV2XML script created 467 XML files each containing a single record.



<?xml version="1.0" encoding="UTF-8"?>

<order>

<PRENOM>SAS</PRENOM>

<NOM>NATURHOUSE</NOM>

<ADR>82 avenue Camille Pujol</ADR>

<CP>31500</CP>

<VILLE>TOULOUSE</VILLE>

<TEL>05 61 26 42 36 </TEL>

</order>





The CHILI configurator can then access the data to set variables using a Switch variable statement



[Metadata.Text:Path="/order/PRENOM",Dataset="Xml",Model=XML]



pietvanc1
Newbie
Posts: 1
Joined: Fri Apr 03, 2015 6:36 pm

Re: How to use Chili with Switch

Post by pietvanc1 »

I have quite the same XML setup and after I define those variables I don't see any changes in the editor. Is there something wrong with my variables or is it just normal that the editor doesn't show changes in the editor and just apply them on the XML?
Post Reply