Jump to content
You must now use your email address to sign in [click for more info] ×

jdo

New Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by jdo

  1. Hi @Mark Daniel, thanks for your excelent reply which makes things a lot more clear to me. I think I'm now able to understand the idea behind the whole function. It is just a suggestion, but in my humble opinion, an error message (at any point) might be handy for a user while trying to insert data from a second data source due to the fact that actually nothing really happends when trying to insert data from a second source. In the described situation I asked myself if I have overseen something obvious, but perhaps it's just me. 🙃 It is true that I tried to use the data merge function for something it was probably never designed for: For creating automated reports. I really love LaTeX, a tool that was definetly not designed for creating fancy brochures or reports. My actual LaTeX dataflow looks like that: A python script collects data from several sources and evaluates a lot of data / variables from them The script also copies a default LaTeX document to a specified folder and changes variables like company name, dates, etc. pathes to images (or for being more precise, no absolute file names are used, so instead of adding images from C:\myfolder\default_template\graphs, images are just lying in the "graphs" folder of the actual folder where the python script adds some graphs to) Due to the fact that I can split a document ober several files, it might just overwrite parts of the document with other files (that might be specified for a special customer) It adds a dynamic number of tables at some parts of the text with a pre-defined number of rows and columns (think e.g. on evaluations for departments, where a table is created for each department) Adds some text passages for different purposes I really like Affinity Photo and Designer, so I just wanted to give the Publisher a fair chance and look how a usecase might look there. Why? Because for being honest, it is kind of a pain to create nice-looking documents with LaTeX. (I hope I didn't offend any member of the Science / LaTeX community with my last scentence. Of course LaTeX creates really great looking documents for many use-cases in science but not for highly customable design which was, and will probably never be, its purpose what's absolutely fine. It's possible, but it's hard work and not really intended. For that purpose we luckily have tools like Affinity Publisher.) So I wanted to get the best of both worlds and miserably failed, because scripting is, as far as I know, actually not a big part of Affinity Publisher. That doesn't mean that I don't like the product, but I'm not sure if it's functions are sufficient this single purpose. Also some variables might be inserted by the data merge function, I'm not sure if it was ever designed for that many replacements where some take whole paragraphs in length. Please correct me if I'm wrong. If we had christmas today and if I had the chance to get a present, I would wish for a simple concept to import data into publisher. This might look like that: Inside Publisher, I create a box with a unique name (like a textbox) and also templates for text and tables Inside a plain textfile I'm able to specify headings, paragraphs and tables (e.g. using the typical wiki style) and speficy in which textbox those shall be placed Being able to import the text / tables using the standard import function in Publisher It's just a thought. Something that comes very close to that actually exists in Publisher, but as far as I know I would habe to import text for every textbox without any chance on automating this process. Please correct me here too if I'm wrong. If something like that already exists in publisher, please let me know. Otherwise I will continue to apply fancy design elements in LaTeX documents, misusing some functions that were definetly not made for this purpose and hoping to get not stoned by the LaTeX community for writing code far away from each and every best-prace approach. 😀
  2. Hi all, I'm an Affinity Publisher newbie, playing around with the data merger. Not sure if this is a bug / feature or if I just didn't get it. I'm trying to insert values from two different JSON / CSV files, but it doesn't work. I'm trying out a proof of concept that shall later generate a report, where my publisher document needs to replace some dynamic parts of a textbox. Due to the fact that - as far as I know - scripting is not supported in Publisher, a python script I wrote creates two json files which look like that: json1.json: [ {"Hello":"World","Hi":"Mars"} ] json2.json: [ {"Hello":"World","Hi":"Mars"} ] Now I open the Data Merge Manager and add the two files as data sources. Using the settings shown in "1_data_merge.JPG", I can double-click my text-box and from the fields tab I can insert values by double-clicking the data merge field . Luckily this works for every textbox in my document. But when I double-click data-fields from the second file in the Data Merge Manager this does not work. The field "Merge Enabled" is not checked there by default (see file 3_data_merge.jpg). I'm not a native speaker, but as far as I could find out by ready the documentation, this field is used to select data from several sources[1]. When I just enable the checkbox, nothing changes and adding fields from the second file into a textbox is still not possible (no error is shown). When I disable the "Merge Enabled" field at the json1.json file, some really strange things happen. At first, the fields from the file json2.json, that were not inserted before, appear right now without me doing anything. Inserting values from the json2.json file is now possible. But when I just click on a textbox that includes values from the json1.json file, they just disappear. So I would just like to know: Do I have to program my python script in a way, that every part of the dynamic text is stored in a single json file or is it possible to insert fields from various data-sources at one? Or is there any other workaround to change dynamic values at several different parts of my document (thise that were spit out by my python script) without importing each and every changed number / part manually? [1] https://affinity.help/publisher/en-US.lproj/index.html?page=pages/GetStarted/importDocument.html?title=Importing documents --> "The Data Merge Manager also lets you disable merging (uncheck Merge Enabled) to allow switching between multiple data sources. You can also control the number of pages generated on merging." BR, JDO OS: Win 10 Publisher: 1.92.1035
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.