Problem opening file from combobox
Copy link to clipboard
Copied
Hello everyone.
The topic that I have pending is the following: I want to create a history of all my books and I try to have a PDF file for each of them that includes their description, language, publication date, etc. I begin this work from a document that I created and in which I integrated three drop-down lists: in the first, I select the genre of the book (technical, suspense, classic), in the second I select the author and in the third I select the title of the book that I want to open and that is already created. I attach a file to clarify the idea of what I want.
I have a script that I fire from the third menu. I have it placed in the "Format" tab, under "Custom Keystroke Script". It is the following:
app.openDoc ("/c/Users/angel/Downloads/Books control/" + event.value + ".pdf");
It works but not very well.
There is correspondence of file names with book titles in the third combobox list. It can be verified that the name of the file will be obtained from the title that appears in the third combobox, adding the extension ".pdf".
Sorry for my English, it´s not my native language.
Thanks in advance.
Copy link to clipboard
Copied
Neat idea!
I would move the code to the Validation event and tick the option to commit the selected value immediately (under Properties - Options of each field). Then it will work more smoothly.
Copy link to clipboard
Copied
Thank you very much.

