3 Replies Latest reply on May 27, 2016 12:15 AM by keywords

    Send container contents to another container

    kyleteech

      Hello!

       

      I am attempting to create a layout view where I can drop a file into a generic container, then perform a script that sends it to another container in my Database. I want to categorize these files in their appropriate fields but don't want to have a bunch of containers showing all at the same time. I also want to avoid placing all the containers down in layout mode and changing their visibility accordingly, I tried this already and it's just too messy.

       

      Is this possible, or is there an easier way of doing this that I might not be thinking of?

       

      Thanks in advance!

        • 1. Re: Send container contents to another container
          CarlSchwarz

          kyleteech wrote:

           

          Hello!

           

          I am attempting to create a layout view where I can drop a file into a generic container, then perform a script that sends it to another container in my Database. I want to categorize these files in their appropriate fields but don't want to have a bunch of containers showing all at the same time. I also want to avoid placing all the containers down in layout mode and changing their visibility accordingly, I tried this already and it's just too messy.

           

          Is this possible, or is there an easier way of doing this that I might not be thinking of?

           

          Thanks in advance!

          You can put a "Script Trigger" on the container field that you are dropping the file in to.  Use "set field" steps in the script trigger to copy the container to the other fields that you want to copy it to.  If you need help with the script then provide more details about the other fields and table structure.

          1 of 1 people found this helpful
          • 2. Re: Send container contents to another container
            Benjamin Fehr

            You might create one container for Input (global field) with a ScriptTrigger

                 Set Field [ MyTable::MyContainer ; MyTable::ContainerInput ]

                 clear [ MyTable::ContainerInput ]

                 Commit [Dialog: OFF]

             

            You might also consider to have those 2 containers layered with HideObjectIf condition

                 MyTable::ContainerInput = (Hide IF) not isEmpty (MyTable::MyContainer)

                 MyTable::Container = (Hide IF)  isEmpty (self)

            1 of 1 people found this helpful
            • 3. Re: Send container contents to another container
              keywords

              Making some assumptions based on what you've described, it sounds like you basically have an initial input table and a final storage table, so the process is pretty straightforward:

              1.     The input table can have a container field and any number of other fields for what you call categorization.

              2.     These field will be matched to similar fields in the permanent storage table.

              3.     You do your data input in the temp table and then use a script to move it all to the permanent table, thus not having to directly access the permanent table.

               

              If that is so, then the container field in the permanent table should be set to external storage, probably encrypted, but the temp container field can be set to directly embed in the file, since contents will only reside in there for a short time.

              As far as passing the data, including the container content, across to the permanent table is concerned, other have already pointed out that you can simply use a series of SetField steps to achieve this, although you might consider matching this with SetVariable steps too if needed.

              If your script also blanks all the fields in the temp table once the permanent record has been set up, then the temp table can be kept to just a single record.

              1 of 1 people found this helpful