1 Reply Latest reply on May 2, 2015 5:59 AM by philmodjunk

    Substitute the data displayed without changing the data. Possible?

    dinoapolito

      Title

      Substitute the data displayed without changing the data. Possible?

      Post

      Hi,

      I have field Jobs::IsActive where the only two values for IsActive are 0 and 1 (where 0 means the job is archived and 1 means the job is active).

      I wish to display this field in a report and give the end user the ability to change the status of a given job.

      That is easy but the value I want to display is Archived and Active respectively not 0 and 1.

      I tried adding a calculation field referencing the IsActive field and using substitute. That displays the data as I want it but because it's a calculation field the user can't change the field's value.

      The table is a shadow table from an external MySQL database not a local Filemaker table.

      I feel I should be able to do this as a kind of conditional formatting but can't see how,

      Many thanks

      Dino

       

        • 1. Re: Substitute the data displayed without changing the data. Possible?
          philmodjunk

          There are several ways to get the results that you want.

          You can use boolean number formatting and specify your Archived and Active text as the values to display in place of 0, 1.

          You can put the two words on your layout as layout text and use Hide Object When expressions that reference your IsActive field to determine which word is visible. Buttons with scripts can change the value of the field and refresh the layout objects to control which text is visible.

          But I think the best approach will be to add a FileMaker table with two records of two fields. In a number field, enter the value of 1 or 0. In a text field, enter the corresponding text. Now set up a use values from field value list with the number field of this table as field 1 and the text field as field 2. You can specify that only the field 2 value be visible.

          You can now set up your field with a value list format such as radio buttons so that they see the text but clicking a radio button actually enters the number.