6 Replies Latest reply on Aug 6, 2016 8:38 PM by what?

    Display substitute data

    what?

      Is there a way to place one piece of information in a field and have that same field display another piece of information?  Say, have the real information in the field be a number originating in a given record, but the field displays some text from a different field in that same record?  I think I read about this somewhere.  Thank you in advance for any responses.  

        • 1. Re: Display substitute data
          David Moyer

          Hi,

          There are probably several ways of accomplishing this.

          One is to create what I call a "show" field - a calculation based on your data that shows what you want the user to see.

          e.g. show_Status = If(Status = 0; "no status available"; "status code = " & Status)

          Use show_Status on your user layout and Status in your admin layout.

           

          Another way:

          Create a table that, given my Status example above, would hold Status text definitions along with their respective Status code numbers.  You would relate this table to the Status code field you don't want users to see.  Put the related text definition on your user layout, and again, the status code number on your admin layout.

          • 2. Re: Display substitute data
            what?

            Thank you David.  I will study your suggestion and try to apply it to my situation.  I am still working on understanding Filemaker syntax.

             

            Show_Status is the name of the calculator field.

             

            The if statement is the calculation.

             

            if the show_Status field value is zero the user sees "no status available" in the record.  If the show_Status field has a particular numeric value the user sees information related to that number.  How do you connect the number to the text data?  This is where I become confused.  Also I am using a repeating field and wish to apply this principle to individual repetitions. The user sees the repeating field via a portal originating in a self related table.  As the user manipulates school names from one repetition to another I need to maintain context for the correct record from which the school originated on my original table. I do this by a field that carries a number associated with the record that contains the school name in a separate field. Thank you again for anything you can offer!

            • 3. Re: Display substitute data
              David Moyer

              it looks like you can't use a related table of number-to-text "translations" via a repeating field.  You could still use a calculated repeating field, but it would be static - no table you can edit or just add new values to.

              Instead of a repeating field, consider converting to a more standard method - replacing it with a table.  Here's a simple example of what I think you're looking for ...

              • 4. Re: Display substitute data
                what?

                Thank you.  I will study your answer and see if it works better than my work around, which involves doubling the number of repetitions from 75 to 150.  When a script places a school name in one of the first 75 repetitions it also places its record ID number in a repetition 75 numbers greater.  When I need to script a way to go back to the original record, I just take the info from the original repetition number plus 75 and fill it in a go to record request. 

                • 5. Re: Display substitute data
                  keywords

                  I'm not sure if it is what you mean, but if you use a popup menu on a field and use a value list which is configured to enter one field but show only a second field in the list, the field itself will also only display the second value in the list, even though the actual field contents is the value in the first field. This is useful to know, for the typical type of value list where you want an ID to be entered, but you only want a data value to shoe in the list, and also on the layout.

                   

                  See the attached demo file.

                  • 6. Re: Display substitute data
                    what?

                    Thank you.  Your response is the idea I was thinking about.  I will look at the sample and compare it to my work around mentioned above.  I am working on a script that will allow me to move school names around in a 75 cell repetition field.  This will show point spreads at a glance.