Have you ever been faced with creating a form with 30 or more lines of repetitive sets of design elements? It can make for a boring afternoon, a strong likelyhood of at least one cut and paste error, and a chance at RSI as a bonus.
In my case, I couldn't collapse the design by storing the data in one field and breaking it out to display columns or some similar. I decided that creating 30x7 controls just wasn't a fun option. Using DXL export/import as a shortcut. seemed like a good alternative. How does exporting and importing the data help? Well, if you don't do anything else, it won't help. On the other hand, you can extract the section of DXL that represents your row of design elements, do a rext replace on the design element names to create a new row, and paste that new row into a new version of the DXL document, the process might be done with less typing.
Note: to make this really easy, you must use a common prefix for all your design elements (eg. "row1_"). You can then turn all elements on row 1 into row 2 with just one text replace. After all, the point is to benefit from the power of applied laziness here. Why make a shortcut that doesn't minimize the effort?
I might not have save much time doing this the first time, but I'll definitely benefit the next time I need to do this. You, dear reader, can benefit without needing to create the import export code.
Note: the first block of code below exports all forms in db to file c:\dxl\
. If you only want to export one form, copy the form to a db with no other forms. I'm sure there's a more elegant solution, but I was in a hurry. The second block of code imports the file c:\dxl\ImportMe2.
I still think have to prepare for DXL work by setting properties vs using parameters is cryptic. How are you supposed to know which ones to use? The documentation contains hints, not complete recipes. That's one reason I'm posting this.
Technorati: None
(0)