I think you need to provide a more detailed example of what you are trying to do here. Exporting from a single field from a single record? Multiple records? Multiple fields?
I'm sorry I'm not making sense. Basically, I created a script that will run a search and export records with specified fields (without dialog). I have a database I use as a template to create other databases. Some databases I create won't use all the fields in the template and I have fields that I check as yes or no which dictates the fields being used. When I run the script, I'd like to be able to look at the yes/no fields and if the fields are set to no, they aren't included in the export.
LifeInsurance = Yes
Export Records (fields: name, date of birth, Life insurance amount taken)
LifeInsurance = No
Export Records (fields: name, date of birth)
Right now, I have a bunch of "else if" statements and each "export records" statement separately. Currently:
If (LifeInsurannce = "Yes"
Export records (various fields including life)
Else if (Life Insurance = "No"
Export records (various fields without life)
and this repeats for many different fields.
I'd like to write something similar to this:
If (LifeInsurance = "Yes"; export records field: Life insurance amount taken; "")
Hopefully this would keep it all on one export line.
I'm probably still not making sense, but maybe this helps a little.
I can't think of a better alternative, but do wonder as to why you need to create so many separate databases. That seems an unusual way of doing things here.
Thanks Phil. I'm sure there is a better, more streamlined way to do this without so many databases, but I'm still pretty new at all of it and just don't know how. Unfortunately, I don't have the time that's needed to really research it and do it right. Thanks again.
Why not use the same template over and over, but just ignore the fields that aren't applicable (the ones you wouldn't choose to export) in the new copy?
Why not add one more field that defines the difference between each of the versions you are creating, and save all the records for every version in the same file, but tag each one with their 'Type' (ie the type of the database you would have stored them in, if you'd exported, etc)?
Unfortunately, I don't have the time that's needed to really research it and do it right.
Careful, not taking the time to "do it right" may cost you far more time in the long run.
I'll work on this. Thank you both for your help.