Page 1 of 1

Export from one stack, inport to another

Posted: Mon May 05, 2008 10:04 pm
by Tom in Carrboro
Is it possible that someone can please tell me or show me how to "export data" and then "import it into a stack."

I set up my working stack incorrectly, and Jacqueline at the help desk has instructed me on what I should have done. That stack is now quite large, but she tells me I can correct it if I — as she says — "do some cleanup. The easiest way would probably be to export all the data, and then import it into a stack that has the correct background set up."

I now know how to create that "correct background" but not how to export or import.

Thank you for helping, if you can.

TominCarrboro

Posted: Tue May 06, 2008 2:36 am
by Mark Smith
Tom, could you tell us how you've stored the data? Is it stored in fields, or custom properties or...?

There are many ways to store data in a stack, so we'd need to know how you've done it before offering a solution.

Best,

Mark Smith

Posted: Tue May 06, 2008 10:31 am
by BvG
Generally speaking you can use the "file:" form of urls to put and get data. How exactly you'd do that is of course up to you, and how your stack is made.

Example:

Code: Select all

on mouseUp
  answer file ""
  if it = "" or the result <> "" then
    exit mouseUp
  end if
  put field "someField" into url ("file:" & it)
end mouseUp
Other example:

Code: Select all

on mouseUp
  answer folder "folder with text files"
  if it = "" or the result <> "" then
    exit mouseUp
  end if
  repeat for each line theLine in theFiles
    add one to x
    create field
    set the text of field x to url ("file:" & theLine)
end mouseUp
things to look up:
answer file command
answer file with type command
answer folder command
defaultfolder property
url keyword
file keyword
binfile keyword
files function

Posted: Thu Apr 16, 2009 9:41 pm
by Tom in Carrboro
Mark Smith and BvG,

It's been more than a year since I looked at this page because a friend came to the house and showed me how to solve the problem. I don't want you to think I was rude, although I was forgetful in not clearing the problem.

Thanks for caring, though.

Tom in Carrboro