5 Replies Latest reply on Mar 31, 2016 3:21 PM by keywords

    container field image attribute in calculation

    Wicktor

      Hello everyone,

      I have container fields where I imported (stored internally) images previously created with photoshop (flat images, no layers).

      Checking those images attributes inside FM14 they they appear stored in ".psd" format.

      I wrote scripts for coping specific images into other container fields but they get suddenly converted into ".png" format.

      For a number of reasons I need to maintain same image format.

      Question:

      Is there a method for maintaining the original image format (.psd) during calculations ? (or, for avoiding problems, do I need to import images inside FM14 in ".png" format ?)

      Thanks for suggestions,

      Victor

        • 1. Re: container field image attribute in calculation
          erolst

          vroncagli wrote:

          I wrote scripts for coping specific images into other container fields

           

          What do these scripts look like?

           

          Are you using the Clipboard (copy/paste), or Set Variable / Set Field?

           

          On a (pun intended) related note, why copy these images at all? Maybe use a single Images table and reference them in other places (after all, FM is a relational database system …)

          • 2. Re: container field image attribute in calculation
            Wicktor

            TableA with only 1 record has all the images stored in repeating container fields.

            TableB has layouts where the user makes choice using pop buttons

            A script generates the random repetitions to be used and copy specific images from TableA into TableB.

            set TableAfield1 get repetition tableBfield2 repetition 5 etc

            • 3. Re: container field image attribute in calculation
              keywords

              TableA with only 1 record has all the images stored in repeating container fields.

              Why not make TableA with one container field and as many separate records as there are images? This would be easier to manage and more open-ended. The choices in TableB layouts would be essentially the same.

              A script generates the random repetitions to be used and copy specific images from TableA into TableB.

              set TableAfield1 get repetition tableBfield2 repetition 5 etc

              Why are you copying images? Why not just reference them?

              • 4. Re: container field image attribute in calculation
                Wicktor

                Well the solution is already structured that way and it works.

                Cannot reference images since they are chosen accordingly with script which select which image is to be showed in a row.

                Only issue is that they import images in .psd format and FM14 convert automatically into .png. format.

                So the question is still the same: Is there a method for maintaining the original image format (.psd) during calculations ?

                • 5. Re: container field image attribute in calculation
                  keywords

                  vroncagli wrote:

                  So the question is still the same: Is there a method for maintaining the original image format (.psd) during calculations ?

                  I have tried various scripted methods of moving images from one container field to another and do not see this happening. Perhaps it is time you posted your script or your file. Otherwise, I don't see how you can get further assistance.