Results 1 to 12 of 12
  1. #1
    Join Date
    Apr 2013
    Posts
    226

    Unanswered: Export questions

    Hi,

    I will be creating several export templates (CSV) for my application and have a few queries I hope someone might be able to help with:

    1. When image fields are exported the images are put into a folder (out.files) and are referenced in the CSV with out\filename (when this works - see previous thread). Now, the applications I want to import into usually require the full path name to the image. So is there any way to have the full pathname supplied in the CSV rather than just out\filename?

    2. Is there any way of knowing what the image filename will be prior to export? Are they always the same or is it just random for each export? It would be useful to be able to sometimes specify a specific path to where the images will be located - a URL for example if they are on an FTP server. Is that possible?

    3. Final question. I mentioned in previous thread that multiline text fields do not export correctly to CSV if there is a carriage return. Is it possible to either prevent carriage returns being placed into these fields or some way to ensure these are removed or escaped at time of export?

    Thanks for any help you can give.

    Matty

  2. #2
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Hi Matty
    Can answer last question (3) in affirmitive. You can use text formatting to convert returns to some other symbol - ie calc_text = [multilines^text REPM[BR]->~] takes your multiline field and outputs returns converted to tides ~. You would need to convert back by the reverse [multiline^text REPM~->[BR]].
    With images I usually store them in related forms with fields - image, source path, date, full name, catagory (the last allows filtering).
    The exporter allows all this formatting plus adding variables (for common paths etc) to be output however you want.

    Regards
    David
    Last edited by tamcind; 04-13-13 at 09:46.

  3. #3
    Join Date
    Apr 2013
    Posts
    226
    Hi David,

    Thanks for the info.

    Quote Originally Posted by tamcind View Post
    With images I usually store them in related forms with fields - image, source path, date, full name, catagory (the last allows filtering).
    Do you store the images within an image field on the related form or links to the images? How do you get the source path? I am usually scanning images directly into the image field. Perhaps I need to review how I approach this.

    Thanks

    Matty

  4. #4
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2

    Image input

    Hi Matty
    One of main reasons I like images in separate form is that that I can "reuse" image for mutiple main records. Exampe: I have asset check database used for status and safety checking. Now many assets look identical visualy ( many tools) etc) so separate images serve no purpose (ony help identify item for staff) but safety reasons each item must have it's own record of periodic checking.
    After uploading from camera to a file (G:\Images\F1) on pc I use a script similar to this:

    [$im_list] = List Files (G:\Images\F1, *.*, No (may want use filters here ie jpg)
    Show Message ([$im_list], , Ok)
    Remove message after testing
    For [$im_path] = Lines From [$im_list]
    Add Record (Photo, Photos, No, Create and Select)
    Change Image/File field (Photo: Photo, [$im_path])
    Photo: [Path] = "[$im_path]"
    Photo: [Date] = "[$_date]"
    Next Item

    Now after some hand editing (notes, what catagory and proper name) I can select image needed via relational links. The reason for catagory will become apparant once image count becomes large (BD can filter input list). If you need to export path, main form could have a lookup field (likely more then one way to do).
    Regards
    David

  5. #5
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2

    Export Sample

    Hi Matty
    Being playing with BD v10 Pro tonight trying to duplicate what I think you are trying to do (probably !00% wrong when I assume things).
    Had no problem exporting images from a form in to files on my c: drive - just supplied C:\ for path and "pic" in front of field record ID with .jpg at end - IE C:\pic[ID].jpg in export dialog. Not really sure about your CSV exporting - by nature can only be txt data and would have to have a field in record holding a reference to image as above (as test combined extract image and export csv into same script and the csv file then referenced these image files on c: drive.
    Now this may not be anything like what you want so may be if you could make and upload a sample file of what you are attempting I may be able to help (or may be not!).
    By the way V10 pro did not put a foot wrong tonight (with the things I was trying that is).
    Regards
    David
    Last edited by tamcind; 04-15-13 at 09:04.

  6. #6
    Join Date
    Apr 2013
    Posts
    226
    Hi David

    I am not using scripts but the built-in export function to CSV or webpage or to Word Doc.

    In v 9.42 if I export a set of records with associated images to a CSV file then the file is populated with out\filename in the image column. Then a folder is created in the same location as the csv file called out and this contains the images. None of this happens in v10. The csv file has a blank entry for the image column and the out folder is not created.

    The same happens with export to webpage. In v9.42 an html page is created with folder for images and the images are displayed on the web page. Again in v 10 this does not happen.

    Regards

    Matty

  7. #7
    Join Date
    Apr 2013
    Posts
    226
    Ps if you could send me a copy of your script you mention that combined exporting images and csv that would be very helpful as perhaps it will work that way while the built-in export function does not. Thanks again for your help and advice.

    Matty

  8. #8
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Will try to make sampe file file tonight (in V10 pro) - sunrise here and off to work.

  9. #9
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Hi Matty
    Just few basic ideas working with images with this file in V9.42 (not V10 see other posts but should work once in V10 once stable). Should be able to control names paths etc with calc's and variables. Note message box has limited rows if a lot of files found.
    Regards
    David
    Attached Files Attached Files
    Last edited by tamcind; 04-16-13 at 08:37.

  10. #10
    Join Date
    Apr 2013
    Posts
    226
    Hi David,

    That's really useful stuff. Thanks v much. Have only had a quick look for now but I think demonstrates scripts to do exactly what I was looking for. One related question. Is their an action that allows user to select a file path to save to?

    Matty

  11. #11
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Updated sample file with 2 colored buttons for you to experiment with. This is just to give you some ideas and would need customizing - the path/dir list on the green button is a quick "jumble" of test paths and may have errors. Hopefully it involves a few new actions to play with.
    The blue image export button is an experimental way select a location on computer - unfortunately you need to select a file (any type file ) to get that folder/path but it does what is intended. There might be better suggestions from other experienced people on forum.
    Update: Ignore list items with dates in path.
    Regards
    David
    Attached Files Attached Files
    Last edited by tamcind; 04-17-13 at 08:35. Reason: Add sample file

  12. #12
    Join Date
    Apr 2013
    Posts
    226
    Thanks v. much David. More really interesting ideas for me to experiment with!

    Matty

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •