Jump to content
The ORIGINAL FileMaker Community - Forum - Online Business Apps & Software Forum
Zach P

Exporting Value Lists

Recommended Posts

Zach P

Hi,

 

I'm looking to export some value lists from a DB to its updated version*, but I've found that I can't do a simple copy-paste. Is there a relatively painless alternative to copying the lists over, or am I going to have to brute force it? Just to note, I'm not looking to simply reference the value lists in the new database - I want to actually move them over. Also, I'm using FileMaker Pro 11 Advanced.

 

Thanks!

 

*The repository system that's being used is pretty arcane (e.g. non-existent), so I'm having to do merges manually (and carefully :worked_till_5am: )

Share this post


Link to post
Share on other sites
Josh Ormond

I remember seeing something Tom Fitch posted once that I have used a few times.

 

Set the Value List Items into a variable, copy and pasted into a text file. Then copy and pasted into the value list in the new file.

 

Set Variable [ $file; Get( FileName ) ]

Set Variable [ $names; ValueListNames ( $file ) ]

Set Variable [ $count; ValueCount( $names ) ]

#

Loop

Set Variable [ $i; Value:$i+1 ]

Exit Loop If [ $i>$count ]

#

Set Variable [ $$result;

List(

$$result ;

GetValue ( $names ; $i ) ; ¶ ;

ValueListItems ( $file ; GetValue ( $names ; $i ) ) ; ¶ ; ¶

) ]

End Loop

Share this post


Link to post
Share on other sites
Zach P

That helped smooth out the process, thanks!

Share this post


Link to post
Share on other sites
Josh Ormond

I'm hoping since they have been in the habit of adding things we can "Copy/Paste...or import", that will be next on the list. ;)

Share this post


Link to post
Share on other sites
schrisman

I was able to use the script and it works great. I see my info in the $$result variable. I'm a newbie and getting stuck on the "copy paste" part. I can't just "control -C" to the clipboard. I'm now reading elsewhere it is not that simple. I'll keep searching for answers, but thought I'd mention where I'm getting stuck. Thanks as always for sharing your knowledge.

 

Follow up 30 mins later: My choice was to create a temp table and then "Set Field" to the value of the variable. Then do a copy from the field, paste into an Excel file to print and review lists with co-workers..

Share this post


Link to post
Share on other sites
Josh Ormond

Add a table with a single field, a calculation.

 

Set it to be the value of your $$variable ( whatever the name actually is ).

 

Add these steps to the above script ( replace the blue parameters with your actual values ):

Go to Layout [
LayoutName
]

Export Field Contents [
FieldName
;
ExportFilePath
]

Go to Layout [ original ]

Share this post


Link to post
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use