Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7188 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Here's my pickle of a situation: I need to generate a set of data (e.g. a set of prescriptions for students to practice counseling) and I want to export the set to another file, then go back and generate another set for the next student. (I want to be able to use all data for random selection, and don't have enough data to just eliminate that which has already been chosen.)

I would like to append the next export to the file the first export went into, rather than creating 200 files (I have 200 students in class!). How do I do that?

I have no problem selecting the data, etc. I just am not sure how to export data and append it to the same file, if that is possible. Any help is appreciated--I'm trying to get this done for spring quarter! Thanks!

Posted

Why create files? Create records, instead, one record per student, with a field for each prescription. You can create these records by script, using a random number generator to determine each prescription from a given list.

Posted

I'm not sure I understand your suggestion. How do I go from marked records and transform them into fields on one record in another file? The file I'm working from is one that creates different prescriptions from a multitude of different variables. I should say the user creates the prescriptions from the file information, not that they are created by the file itself. So, for example, there might be 750 different prescriptions created in the file. Each student is to get a random selection of 30. I mark the first set of 30. How do I turn that into thirty fields to be exported as one record?

Thanks for responding!

Posted

Import into your secondary file instead of trying to Export from your primary one.

  • 2 months later...
Posted

Although importing would resolve this, Its not a great solution if you have to run a script on the primary file to get the data.

I need a solution to concatenate / append data to an export file.

My current setup:

A script loops round writing grouped information into global fields. Once this loop is finished, I want to export that data into a FM / csv file.

The script then runs through another cycle until its new set of data has been written, this now needs to be appended to the same target file.

I have over 15,000 prodcucts in a databsae which the above script groups, based on various criteria. An automatic solution is desired, not requiring manual intervention to activate scripts or import hundreds of times.

Any way of appending export data ? .. unfortunately the 'script generated' global fields can not be related to the target file, as there is no unique data anymore. The keyfield WAS the productID for the product. After the script has run anything from 2 - 100 products could be merged into one global field, thus killing its unique relational value.

Any help here would be appreciated smile.gif

Posted

Although importing would resolve this, Its not a great solution if you have to run a script on the primary file to get the data.

I need a solution to concatenate / append data to an export file.

My current setup:

A script loops round writing grouped information into global fields. Once this loop is finished, I want to export that data into a FM / csv file.

The script then runs through another cycle until its new set of data has been written, this now needs to be appended to the same target file.

I have over 15,000 prodcucts in a databsae which the above script groups, based on various criteria. An automatic solution is desired, not requiring manual intervention to activate scripts or import hundreds of times.

Any way of appending export data ? .. unfortunately the 'script generated' global fields can not be related to the target file, as there is no unique data anymore. The keyfield WAS the productID for the product. After the script has run anything from 2 - 100 products could be merged into one global field, thus killing its unique relational value.

Any help here would be appreciated smile.gif

Posted

Although importing would resolve this, Its not a great solution if you have to run a script on the primary file to get the data.

I need a solution to concatenate / append data to an export file.

My current setup:

A script loops round writing grouped information into global fields. Once this loop is finished, I want to export that data into a FM / csv file.

The script then runs through another cycle until its new set of data has been written, this now needs to be appended to the same target file.

I have over 15,000 prodcucts in a databsae which the above script groups, based on various criteria. An automatic solution is desired, not requiring manual intervention to activate scripts or import hundreds of times.

Any way of appending export data ? .. unfortunately the 'script generated' global fields can not be related to the target file, as there is no unique data anymore. The keyfield WAS the productID for the product. After the script has run anything from 2 - 100 products could be merged into one global field, thus killing its unique relational value.

Any help here would be appreciated smile.gif

Posted

I'm exporting the global fields as 1 record (ie 5 global fields generated by the script). All 5 need to be inside 1 record of the new desination file.

The script will probably loop a few more times anywhere between 30+ to generate a new set of gloabl variables. Every time the script loops round a new set of globals is created and this new set wants to exported to a new record in the same destination file, the script exits after las record in the found set.

Considering the source database contains 16,000+ records a found set could be anyhwere beween 70 and lets say 6,000.

Posted

I'm exporting the global fields as 1 record (ie 5 global fields generated by the script). All 5 need to be inside 1 record of the new desination file.

The script will probably loop a few more times anywhere between 30+ to generate a new set of gloabl variables. Every time the script loops round a new set of globals is created and this new set wants to exported to a new record in the same destination file, the script exits after las record in the found set.

Considering the source database contains 16,000+ records a found set could be anyhwere beween 70 and lets say 6,000.

Posted

I'm exporting the global fields as 1 record (ie 5 global fields generated by the script). All 5 need to be inside 1 record of the new desination file.

The script will probably loop a few more times anywhere between 30+ to generate a new set of gloabl variables. Every time the script loops round a new set of globals is created and this new set wants to exported to a new record in the same destination file, the script exits after las record in the found set.

Considering the source database contains 16,000+ records a found set could be anyhwere beween 70 and lets say 6,000.

Posted

Make a new database with 5 text fields and write the globals from each loop to a new record. If you need a .csv file simply Show All Records & Export from the new file after the loop completes.

Posted

Make a new database with 5 text fields and write the globals from each loop to a new record. If you need a .csv file simply Show All Records & Export from the new file after the loop completes.

Posted

Make a new database with 5 text fields and write the globals from each loop to a new record. If you need a .csv file simply Show All Records & Export from the new file after the loop completes.

Posted

thanks for your response. but i already have a new database with 5 text fields in them.

I am trying to write to it, thats my big problem.

HOW can i write the globals from my script into the new database ? As there is no relation link between them, there is no way of the script knowing where to write the data to .. ..

I need to think about this a little more.

Posted

thanks for your response. but i already have a new database with 5 text fields in them.

I am trying to write to it, thats my big problem.

HOW can i write the globals from my script into the new database ? As there is no relation link between them, there is no way of the script knowing where to write the data to .. ..

I need to think about this a little more.

Posted

thanks for your response. but i already have a new database with 5 text fields in them.

I am trying to write to it, thats my big problem.

HOW can i write the globals from my script into the new database ? As there is no relation link between them, there is no way of the script knowing where to write the data to .. ..

I need to think about this a little more.

Posted

Use the X relational operator to match all records from each table (not sure what version the X operator was added to FM).The attached file is for FM7 not sure what version you are using.

Posted

Use the X relational operator to match all records from each table (not sure what version the X operator was added to FM).The attached file is for FM7 not sure what version you are using.

Posted

Use the X relational operator to match all records from each table (not sure what version the X operator was added to FM).The attached file is for FM7 not sure what version you are using.

5textFields.zip

Posted

Am using FMPro 6 (Have access to 7 but not really taken a look yet.) The solution I 've developed for a charity group is quite complex and time/funds aren't in place to migrate over to 7 yet. I use both platforms PC and Mac.

I will see if I can take a look at your files later, any chance of a FMP6 version ?

I'll look at the X relational operator online, see if I can get my head around it.

Thanks for the feedback sbg2.

Posted

Am using FMPro 6 (Have access to 7 but not really taken a look yet.) The solution I 've developed for a charity group is quite complex and time/funds aren't in place to migrate over to 7 yet. I use both platforms PC and Mac.

I will see if I can take a look at your files later, any chance of a FMP6 version ?

I'll look at the X relational operator online, see if I can get my head around it.

Thanks for the feedback sbg2.

Posted

Am using FMPro 6 (Have access to 7 but not really taken a look yet.) The solution I 've developed for a charity group is quite complex and time/funds aren't in place to migrate over to 7 yet. I use both platforms PC and Mac.

I will see if I can take a look at your files later, any chance of a FMP6 version ?

I'll look at the X relational operator online, see if I can get my head around it.

Thanks for the feedback sbg2.

Posted

Queue already gave you the solution. Create your found set in the source file. From within the source file, call an external script in the target file. The called script IMPORTS the found set from the source file.

Posted

Queue already gave you the solution. Create your found set in the source file. From within the source file, call an external script in the target file. The called script IMPORTS the found set from the source file.

Posted

Queue already gave you the solution. Create your found set in the source file. From within the source file, call an external script in the target file. The called script IMPORTS the found set from the source file.

Comment, thanks. It's not always clear for me when viewing previous posts to simply understand a one line response, mainly because my mind is reeling form something I feel should be striaghtforward like appending or concatenating crazy.gif. To operate in reverse almost is strange. I'm still trying to get my head around Scriptmaker way of thinking. I had starting thinking about the external script idea just before I read your post smile.gif it hit home when I read it.

In my situation, its not as straightforward as importing the found set from my source file. I only need to import a single record(instance) from the source, even if the found set contains hundreds of records. So the solution still isn't foolproof.

I got the import script (this is the script in the target file) working, and my workaround is thus:

Creating a script in the target file which does the following:

a) creates a new record

:P perform find on a field that has a data field (which I set to NEW) for "NEW"

this ensures you only ever get 1 record returned in the found set.

c) Import the fields using the option "Replace Data in found set"

d) delete the content of the NEW field

It still brings up an error message when it imports as its trying to import the total value of found records in the source file, but at least it automates nearly all of the process barring this one error message, so if i can get round that then automation is on.

Posted

Queue already gave you the solution. Create your found set in the source file. From within the source file, call an external script in the target file. The called script IMPORTS the found set from the source file.

Comment, thanks. It's not always clear for me when viewing previous posts to simply understand a one line response, mainly because my mind is reeling form something I feel should be striaghtforward like appending or concatenating crazy.gif. To operate in reverse almost is strange. I'm still trying to get my head around Scriptmaker way of thinking. I had starting thinking about the external script idea just before I read your post smile.gif it hit home when I read it.

In my situation, its not as straightforward as importing the found set from my source file. I only need to import a single record(instance) from the source, even if the found set contains hundreds of records. So the solution still isn't foolproof.

I got the import script (this is the script in the target file) working, and my workaround is thus:

Creating a script in the target file which does the following:

a) creates a new record

B) perform find on a field that has a data field (which I set to NEW) for "NEW"

this ensures you only ever get 1 record returned in the found set.

c) Import the fields using the option "Replace Data in found set"

d) delete the content of the NEW field

It still brings up an error message when it imports as its trying to import the total value of found records in the source file, but at least it automates nearly all of the process barring this one error message, so if i can get round that then automation is on.

This topic is 7188 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.