Jump to content
  • 0

Importeren bestanden


EricJ

Question

Posted

Geacht Forum,

 

Stel je hebt als basis een dBase 50 records, daarop een veld met de titel: produkt,

Stel je hebt een nieuwe dBase waarin je alle 50 records wilt importeren, echter nu in een veld met 50 herhalingen (inclusief scrollfuncties dus).

 

Hoe los je dit importeren op? Als ik normaal importeer dan maakt FMP keurig nieuwe records en dat wil ik in dit geval niet.

 

Groet,

Eric

3 answers to this question

Recommended Posts

  • 0
Posted

Repeating fields zijn eigenlijk uit de tijd, hoewel ze in heel specifieke gevallen toch nog wel eens handig durven zijn :wink: . FileMaker ondersteunt die eigenlijk niet meer en dat is te zien: er is wel een mogelijkheid om de inhoud van repeating fields tijdens het importeren netjes te verdelen over een aantal records (5 repetitions komen dan in 5 records), maar voor het omgekeerde is - voor zover ik me uit het hoofd herinner - niets voorzien :cry: . Je zal het dus zelf moeten klaren.

Denk eens na hoe je dat manueel zou doen, en giet dat algoritme dan in een script. Moet niet zo moeilijk zijn.

 

Succes

  • 0
Posted

Kan je hier iets mee aanvangen? Heb het gevonden in een archief-bestand maar ik ben de oorspronkelijke auteur kwijtgespeeld. Hopelijk vergeeft hij/zij het mij wanneer we mekaar in de hel op het lijf lopen (FileMakeraars mogen in de hemel niet binnen: daar werken ze met Access of zo).

This is another method of moving data from several fields into repeating fields. This method differs from the other in two ways:

1- It does not require any calculation fields to be created. The calculation required for the other method is longer and more complex when the number of fields involved is large.

2- It requires exporting and importing the data, and the use of a word or text processor that can search and replace on the ASCII 29 character.

 

 

This example assumes that the database includes six fields PartNumber1, PartNumber2, PartNumber3, Description1, Description2 and Description3. The data in the three PartNumber fields needs to be combined into a repeating field called PartNumbers. The data in the three Description fields needs to be combined into a repeating field called Descriptions.

 

1) Browse all records (choose Find All from the Select menu, or verify that Find All is dimmed).

 

2) Get the database into unsorted order (click the Unsort button in the Sort window, or verify that Unsort is dimmed).

 

3) Do not delete any records during this process.

 

4) Define two new fields, PartNumbers and Descriptions

 

5) Export the data to text files. Each group of fields destined for a repeating field needs to be exported to separate text files:

a- Select the Export command from the File menu. Select Tab-Separated text from the File Type popup (tab-separated format makes the following steps easier than comma-separated, but is not appropriate if any of the fields contain returns.). Type a file name, then click New.

b- In the export field list, make sure that there are checkmarks ONLY in front of the fields PartNumber1, PartNumber2 and PartNumber3. Click OK.

c- Perform steps a and b again, this time exporting the fields Description1, Description2 and Description3 to a second text file.

 

6) Open the first text file in any word or text processor that can search and replace on ASCII character 29 (this includes Microsoft Word, WordPerfect and Vantage).

a- Using the Find/Change command, find all tabs and replace them with ASCII 29.

In Microsoft Word, select the Change... command. In Find What type ^t. In Change To type ^29.

In WordPerfect, select Find/Change... from the Search menu. Insert a tab in Find using the Insert menu. Then click in Change To. Select Character Map from the Font menu. Click on the character which looks like a square, directly above the equal (=) character. Click the Change All button.

b-Save to a plain text file (usually done using the Save As command in most word processors).

c- Open the second text file. Replace all tabs with ASCII 29. Save to a text file.

 

7) Re-open the FileMaker Pro file.

a- Select Import from the File menu. Select the first text file from the word processor, then click Open. In the import order window, align the PartNumbers field name with the data by dragging it to the top of the field name list. Choose “Replace Data in Current Found Set.” Click OK. The data will Import into the PartNumbers field.

b- Repeat step a, this time opening the second text file from the word processor, then importing into the Descriptions field.

  • 0
Posted

Harstikke bedankt voor het antwoord, ik ga er mee stoeien.

 

Misschien dat ik echter alsnog probeer het probleem anders op te lossen. Zoals al gemeld zijn repeating fields niet bedoeld voor datgeen ik er misschien mee wil.

Maar de aangedragen oplossing is het zeker waard om te bestuderen, al was het maar puur als studieobject.

 

Eric

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...