DaCo Posted June 19, 2014 Posted June 19, 2014 I have this script: Go to Layout ["Upload" (Upload)] Show All Records Export Records [No Dialog; "butik.txt"; "FMPXMLRESULT"; "Butik.xsl"; Unicode (UTF-8)] I want to modify the script to only export a found set of records (Records > Saved Finds > "Actual"). How to do that? I'm running FM Pro Advanced 11.0v4
Lee Smith Posted June 19, 2014 Posted June 19, 2014 If you working with a Found Set, then the Find All Records Script Step is changing it to all records. In other words, you don’t want it. How was the Found Set being created prior to this script being ran?
comment Posted June 19, 2014 Posted June 19, 2014 I don't think there is a way for a script to access the finds saved by the users. But you can save find requests within the script itself.
DaCo Posted June 19, 2014 Author Posted June 19, 2014 Thanks to both of you. I'll try to express myself in short ;-) Every week I make an import of new products from a Excel file (50-100 numbers). When the import is finished, the new records are displayed. One of the fields contains a "Date added", which are created in the Excel file. I the save these records in "Saved finds". Very convenient when/if I want to go back to this selection/import in the database. I now realize that I can perform a 'find' in the script, searching for the "Date added". I suppose that I will be able to define that ;-)
DaCo Posted June 19, 2014 Author Posted June 19, 2014 Thanks to both of you. I'll try to express myself in short ;-) Every week I make an import of new products from a Excel file (50-100 numbers). When the import is finished, the new records are displayed. One of the fields contains a "Date added", which are created in the Excel file. I the save these records in "Saved finds". Very convenient when/if I want to go back to this selection/import in the database. I now realize that I can perform a 'find' in the script, searching for the "Date added". I suppose that I will be able to define that ;-) It works!!! Thank you very much :-)
comment Posted June 19, 2014 Posted June 19, 2014 I the save these records in "Saved finds". Something is missing from your description. A saved find does NOT save records; it saves the find criteria that were used in the last find. If you perform a find for * in the "Date added" field, then import some records, then save the current find, you will end up with a saved find that shows all records with anything in the "Date added" field.
DaCo Posted June 21, 2014 Author Posted June 21, 2014 Thanks, Consultant, that makes sence. But how can I define two or more parameters when defing af 'Find' in a script? If I choose "Perform find" in the dialogue, I can select a layout, a field and ONE field and a criteria. How do I perform a Find with Criteria: 16/06/2014 AND 'New Music' = x?
comment Posted June 21, 2014 Posted June 21, 2014 In the 'Edit Find Request' window, select the 'New Music' field, type "x" into the 'Criteria' cell and click the 'Add' button. Another way, which is often more convenient, is : Enter Find Mode{} Set Field [ Date added ; Get (CurrentDate) ] Set Field [ New Music ; "x" ] Perform Find[] with no find requests specified for either the Enter Find Mode{} or Perform Find[] steps.
Recommended Posts
This topic is 3806 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 accountSign in
Already have an account? Sign in here.
Sign In Now