Skip to main content
Participant
June 12, 2020
Question

Problem opening file from combobox

  • June 12, 2020
  • 1 reply
  • 433 views

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.

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
June 12, 2020

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.

papaelbazAuthor
Participant
June 13, 2020

Thank you very much.