3 Replies Latest reply on Jun 17, 2011 2:06 PM by philmodjunk

    Getting values from repeating fields

    mfl666

      Title

      Getting values from repeating fields

      Post

      Hello,

      I have a layout where I had to change a repeating field into 8 separate fields.

      In the picture the user would select one of the icons from the portal and then use the green arrow to Copy/Paste into the containers below.

      Now with the change I need to display original repeating field data in the separate fields if it exists otherwise blank so that the user can select from the portal.

      I tried to create a calc but it's not right.

      Thanks

      Michael

      Screen_shot_2011-06-17_at_11.32.54_AM.png

        • 1. Re: Getting values from repeating fields
          philmodjunk

          Can you explain what you are trying to do in more detail?

          May be give a step by step example of what you want the user to be able to do here?

          • 2. Re: Getting values from repeating fields
            mfl666

            Phil,

            The user is building care and content info for our overseas factory.

            The user clicks on one of the icons in the portal listing and then clicks the green arrow to drop it into the container at the bottom, which used to be a repeating field.

            Due to SyncDek I have to split all repeating fields with separate fields so that they can be transferred to our China DB.

            I need to have "Style_Care_Content_Label_Icons(1)" appear in "Style_Care_Content_Label_Icons1" field if there is a value present otherwise present an empty container so the user can select from the portal.

            The one symbol in the first field on the left wouldn't be there normally.

            Hope this helps.

            Michael

            • 3. Re: Getting values from repeating fields
              philmodjunk

              So the problem is in loading the individual fields with the contents of the repeating field.

              My preference would be to use a related table of records with one container field in each related record. With that structure, you can import the data from your current table and specify that the repetitions be split into individual records. You'd only map two fields from your current table for this import: The ID field that serves as the current table's primary key to be used as a foreign key to link it to your existing records and the repeating container field would be mapped to the non-repeating container field in the new record.

              To display your row of records below the portal, you can create what's known as a horizontal portal. You'd place 8 one row portals to your new related table with the first set to display row 1, the second set to display row 2 and so forth.

              Sticking with your current design, you can do a series of 8 Replace Field Contents operations with a calculation such as:

              GetRepetition ( Style_Main::Stylecare_Contents_Label_Icons ; 1 ) For the first field.
              GetRepetition ( Style_Main::Stylecare_Contents_Label_Icons ; 2 ) For the second field

              and so forth...

              Make a back up copy before trying this and Select Show All records before the first replace so that you update all your records during each replace.