I have made an example database to make my question more visible.
When you go to the layout "Menu" you see fields for three tables which i import from a textfile including 2 portals, i then edit a couple of fields use an exportscript for that indidual record and collect this in the "Export" layout. This is an layout with with 2 portals and the other fields form where i collect this data into one field for export to a fixed filelenght without delimiters.
The problem is that when i look at the collected data in the Exportfield i only get the data from the first portal rows. I think i have to do something with a loop again in the script but can't find out what.
Thank you very much for helping me out !!
Export Example.fmp12.zip 19.9 K
From a quick look at your RG, i suspect you need to delete the link between Table_2 and Table_3 as it will become a Many to Many when there's more than one record with the same Keyid_Table_2. That will be why you are only seeing the first record in your Table_3 portal.
Since you've made the portals in the layout based on Import_Table_1, I'd recommend that you link the Key_id_Table_3 to Keyid_Table_1. So long as Keyid_Table_1 is unique you will overcome the Many to Many relationship and hopefully make it unnecessary for any looping construct.
I am not sure what you are trying to accomplish here, I would think that you could export this straight from the menu layout, if you collect all the data in one field.
I have altered your example to show how you could do that.
If you only want to export the current record, you can use Show All Records + Hide Current Record + Show Ommitted Records
Hope that helps,
Ruben van den Boogaard
PS. you can email me in Dutch if that is easier.
Export Example B.fmp12.zip 60.3 K
Hi Ruben en John,
Thank you very much for your replies, Ruben this works great again thank you !! I've send an mail via your site.
Perhaps one little last question for you is it possible to count the records in the portal per record and display this in a field ? Cause when i use a count function on KeyId i get 1 as result?
Still another question, when i use the substitute(List... function as used in the example from Ruben (Calculation is below)
I states the values great but lists them beside eachother per value of that field so for instance Field 7 = Appels, Pears, Bananas Field 8 = Chicken, Cow where i want it in this order: Field 7 = Appels, Field 8 = Chicken, Field 7 = Pears, Field 8 = Cow etc...etc...
Is this possible ?
This is the calculation field from Ruben:
KeyId_Table_1 & Example_Field_1 & Example_Field_2 & Example_Field_3 &