Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 11:18 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Page versus publication variables
PostPosted: April 6th, 2007, 4:20 am 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi

In a pub that will have 30 + pages, each saving data in a number of variables attached to text input boxes, stored to text files, one for each page:

would I be better off using page or pub variables?

If I use pub variables, I suspect that they will total several hundred to each uniquely represent a data element for a text input box.

Alternately, I think (this is where I need some help) that I can use the same 25-30 variables over and over on each page, if they are page variables.

Each page will need to be saved to a separate text file (my ability to conceive of a way to save them, via scripting, in the same text file, writing to and reading back from different lines in a single file is far too limited to succeed at this-I tried for a couple of days already to no avail. :? )

What are the pro's and con's of page versus pub variables in this situation?

Any help would be appreciated.

Kind Regards,

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 8th, 2007, 9:15 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
I hope I have understood your question correctly.
The pros and cons must be related to how much resources each variable uses. Normally, when you declare a variable, the software allocates a chunk of memory resources when it loads, for storing the information. I have no idea what the relationship is for Opus. If you have hundreds of variables, then it allocates little bits of memory hundreds of times. I can't imagine that for most systems it would be a problem, but you could check by looking at allocated resourses in the task manager when the program is running.
If you use page variables, I have no idea if Opus releases the resources when it moves from one page to another, so there may be no advantage in doing that. For example, if you have 30 pages and 30 variables on each page, using publication variables and a different name for each one, would need 900 variables.
Using page variables, if Opus does not release the resources will still require the resources for 900 variables.
There is another simple way. If you use publication variables, but use the same variables names on each page, it will overwrite the data each time it moves to a new page. Since you seem to have to store the variables anyway. This would only require 30 variables. You just have to remember that the variables will have to be cleared when you initially load each page---you could use ResetVariables(); but this resets ALL publication variables or you could simply reset the reusable ones when the page loads.....as always in Opus there are several ways of doing the same thing .


From what you say in your question, you have to store the variables in text files. These variables are actually data and it sounds like it has some kind of structure if the same variables are used on different pages. A database could be used to store the data rather than text files.
As I said above, I hope I understood your question and what you are trying to achieve.

_________________
Whoever designed this, never actually used it!


For this message sandyn has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 8th, 2007, 9:54 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi

Thank you for your detailed and thoughtful reply.

Having created a form in Acrobat which would simply gather the needed information, I have had a chance to become quite familiar with the number of different info types, which for the Opus pub, would require storage in separate variables.

It turns out to be 43 (give or take). The good news is that these 43 items (all or in part) are always used when information is collected for each person in a group of 30 or more persons.

So, the trick is to set up the same 43 variables for each Opus form page (30 or more pages) and, if possible, save the array of 43 variable's values (user-entered info, like name, age, etc. for their 30 + family members) to a separate line for each page, into a single text file. The info, encrypted in the text file, needs to be e-mailed, thus the preference for one text file rather than 30+, as email attachments.

Not being too skilled with writing to/reading from text files, using successive lines, so the variable values from one page don't overwrite the variable values from another page (let alone 30+) this is where I get stuck. Spent a couple of days trying to figure out how to label the first array item uniquely for each page, so it could identify that page's line/field and read back the 43 values, re-displaying them as inserted variables in a text box or table. Ugh!

I've put this struggling aside for now, having been unsuccessful, but will probably go back to it as soon as some inspiration and/or help gets me unstuck.

Thanks again for your ideas.

Kind Regards,

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 8th, 2007, 11:59 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
It sounds like an ideal candidate for a database one table would hold all the data. Each person is indexed, with 43 data fields for the other information. Very easy to search and retrieve the data then extract it to put in an e-mail. You have the power of SQL to carry out searches. It's not difficult to do and well worth going through the learning curve.

_________________
Whoever designed this, never actually used it!


For this message sandyn has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 9th, 2007, 12:44 am 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi

Thank you for your reply. The database route sounds very positive. I'm afraid I have little knowledge or skill in this arena. I have MS Access installed, and have used it once, in a very minimal fashion.

From a quick viewing of the help guide in Opus, it appears that as long as I am OK with delivering the database in the Opus executable, I can use Access. Not knowledgeable, I hope that the end-user will not need Access on their computer to simply enter data into the Opus pub at runtime. If they do, then this won't work.

The other issue will be somehow setting up secure (encrypted) storage of the entered data so it can be sent in a secure fashion to me by e-mail (hope this is possible; can't use anything that is not secure to send health sensitive data over the internet).

I'll keep reading.

Again, thanks for the lead.

Kind Regards,

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Saving variables
PostPosted: April 9th, 2007, 10:56 pm 
Offline

Joined: November 3rd, 2004, 6:44 pm
Posts: 59
Location: Ipswich, UK
Hi,

I quite often do something similar with online questionnaires. I assign a variable for each question and then write all these at the end of the questionnaire to a .CSV file so that I can look at the data in Excel. THis could be another possible way forward for you and is simpler than the database route.

Would you like an example document?

Regards

Clive Cartmel


For this message Clive Cartmel has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 10th, 2007, 12:26 am 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi Clive

Thank you for your suggestions. I need to be able to encrypt the database file for security and checked: while Excel can have a password, it is not able to be encrypted. This leaves Access or storing using Opus and variables into an encrypted text file. The online approach would need an https subscription which is a little pricey and a recurring expense.

The one database option I'm not clear about is SQL and need to learn more. Being unknowledgeable about databases, is SQL simply the query language used with a database like Access, or is it a full database of its own? What about encryption in SQL?

Kind Regards,

_________________
Stephen


For this message Stephen has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: April 10th, 2007, 4:49 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
I have similar, though simpler, challenge ahead of me.

Quote:
while Excel can have a password, it is not able to be encrypted.

Could this be a workaround here? Have Opus action to write variable to a text file encrypted, then read it back out immediately still encrypted into another shadow-variable and then into Excel? Sounds like a ton of work though.


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: An alternative
PostPosted: April 10th, 2007, 11:01 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Hi Stephen,

Lar's right, but rather than read back the encyrpted file, while not save the information in an encrypted file and simply email this to yourself. You can then read this back into an opus program using the right key.

Not sure what level encryption Opus uses or what data protection requirements are for the states but I've spent the last week working out the best way of securing file using the built in in encryption. My only caveat with Opus is that the encrypted text is that the same with each key. My workout to this was to create a long random key unique to each file and store this in an encrypted form with each file.

As for databases, I've not tried one for a while because if I remember correctly, they need a an ODBC link to talk to the access file. This isn't a problem on your own machine, but means that you need a software installer that will create one on the host machine.

Mackavi


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 63 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group