July 17, 201213 yr I need a script that will export multiple records to .tab files without me having to manually export each record. How do I do this? Help!
July 18, 201213 yr Author Yes, I know that. I just don't how to write the script properly. I am not a programming genius. I tried writing a script, but it just put everything into one file. Is there a basic script that will loop through a found set that I can modify????
July 18, 201213 yr Remeber Export Record will export the found set set variable ($count;value:0) loop set variable ($count;value:$count +1) perform find() /* value + count.. or record id.. you need to set up and Id on each record or a count.... export records($variable here) end loop if($count > $count > Get ( TotalRecordCount ))
July 18, 201213 yr Author What do you mean by "you need to set up and Id on each record or a count..."? I have two fields. TEAMID and PFACODE. I want to output a file for each TEAMID that lists all the lines/records/rows (whatever you want to call them) of the PFACODE. Also, how do I name each record using the TEAMID & .tab? Ughhh!
July 18, 201213 yr This part is not quite clear: I want to output a file for each TEAMID that lists all the lines/records/rows (whatever you want to call them) of the PFACODE. If PFACODE is a field, then it cannot contain records. Perhaps you meant to say it contains multiple values - but if you export a single record in a tab format, the separate values in a field will NOT be tab-delimited. --- Besides, if your field contains multiple values that need to be exported as separate lines/records/rows, you may want to re-examine your structure and turn them into separate records in a related table. Edited July 18, 201213 yr by comment
July 20, 201213 yr Author Ok, yes, I meant values not records. Ok, if I turn them into related tables, then is there a script that will export them in the manner that want the to be exported????????
July 20, 201213 yr Well, there are two ways: first, even with your current structure you could export each record in turn by using the Export Field Contents [] script step, using a calculation field to substitute the returns with tabs. However, the resulting file will be UTF-16 encoded, and not all target applications can handle that. The other option is to export as XML, using a custom XSLT stylesheet to build the exported file to your specifications.
July 20, 201213 yr export as XML (with XSLT) will not allow you to create multiple files upon output, if that's your goal. Are you trying to get separate files (one per found record)?
July 21, 201213 yr export as XML (with XSLT) will not allow you to create multiple files upon output No, of course not; you still have to loop through the found set and export each group of values in turn. I should have made that clear. Still, if your target application won't accept a UTF-16 encoded file, it's the only practical way to place tabs between the exported values.
July 21, 201213 yr @TMaher1 I'd like to take back my first response. I'd rather ask you, "why?" Is this for import into another system?
July 24, 201213 yr Author Because the PFACODE contains HTML code. I'm trying to create web pages for each find of TEAMID and all the PFACODE values related to TEAMID. No, I don't want to use FM server. Again, is their some script that can "automate" will repeat the export of each related record without me having to it manually one at a time????????????
July 24, 201213 yr I have already mentioned two ways to do it. If you have said 'No, my target app cannot handle a UTF-16 encoded file" or "Yes, there is no problem with a UTF-16 file", we could concentrate on one of them. PFACODE contains HTML code Well, that's new. Why, then, is it important for the values to be tab-separated?
August 14, 201213 yr Author I have already mentioned two ways to do it. If you have said 'No, my target app cannot handle a UTF-16 encoded file" or "Yes, there is no problem with a UTF-16 file", we could concentrate on one of them. Well, that's new. Why, then, is it important for the values to be tab-separated? Ok, I'll change the output to .html. Geesh.
Create an account or sign in to comment