5 Replies Latest reply on Jan 13, 2017 8:56 AM by navarro

    copying data to one field from multiple portal records




      My purpose is to copy what is shown on a portal into a field.


      In the main table Dish there is a portal based on the Dish|Food table that shows values both from the Food  and the Dish|Food tables.


      In order to make things easier, in the Dish|Food table I have created text looked up fields to the Food table, so that all relevant data is in the Dish|Food table.


      Each row of the portal shows the following fields:

        Dish|Food::FoodName (text, lookup)   Dish|Food::FoodAmount (number)    Dish|Food::FoodUnits (text, lookup)


      The fields in the portal are sorted by the FoodName


      I would like to reproduce in the Dish|Food::DishCombine field what is shown on the portal.


      For example, if the portal to the Dish|Food table shows:


      Green beans 200 g

      Olive oil 20 ml

      Potatos 400 g

      Salt 1 g


      I would like the same in the  Dish|Food::DishCombine field


      Green beans 200 g

      Olive oil 20 ml

      Potatos 400 g

      Salt 1 g


      The reason being that I will capture that data later on to be used somewhere else.






      Relevant fields:




      Dish|Food:: __kpDish|FoodID

      Dish|Food:: _kfDishID

      Dish|Food:: _kfFoodID


      Dish|Food::FoodName (text, lookup)

      Dish|Food::FoodAmount (number)


      Food:: __kpFoodID

      Food:: FoodName

      Food:. FoodUnits



      Dish::__kpDishID = Dish|Food:: _kfDishID

      Food:: __kpFoodID = Dish|Food:: _kfFoodID


      I am using FileMaker Pro 15 and I have looked at FMI knowledge base note on "How to copy data to one field from multiple portal records". But I haven’t been able to get the 3 fields in the right order in the Dish|Food::DishCombine field.


      I have tried both Set Field [MainTable::Combine; List (RelatedTable::DesiredField)] and the Substiute function, but I haven’t being able to pull this out on my own.


      So any help is greatly appreciated