1 Reply Latest reply on Mar 10, 2011 8:49 AM by philmodjunk

    Conditional Value List Reporting

    MatthewMackay

      Title

      Conditional Value List Reporting

      Post

      Good afternoon,

      I've been working on a solution for quite a while now, learning FM as I go. I've finally got to grips with conditional value lists, can get them working as I require.

      My solution requires there to be pre defined value lists though, so the user has some value lists to start them off with. When it comes to the report, these pre populated records show in the report.

      Do I need to add in another TO or completely seperate table to contain these pre populated records or is there perhaps a way of omitting certain groups of records when running the report script?

      Haven't been using FM for long so if anyone knows how to get this working, please describe in as simple terms as possible.

      Cheers

      Matthew

        • 1. Re: Conditional Value List Reporting
          philmodjunk

          A little more detail or an example might help.

          I think you could add a "report" single value check box to your value list and then use it to exclude records from your report where this option was not selected.

          Yes, you'd probably need an additional table occurrence to link the value list field to your main table by the selected value rather than the category field used to filter the list.

          Say you have this relationship as needed for your conditional value list:

          MainTable::CategoryKey = ValueListTable::CategoryKey

          Add a table occurrence of ValueListTable and link it ot MainTable like this:

          MainTable::ValueListField = SelectedValueListTable::ValueField

          Then you can perform a find by putting * in the related SelectedValueListTable::ReportFlag field and specify that this be an "omit" request to eliminate all records where the selected value does not have the checkbox for the ReportFlag field selected.

          In a script, you'd do it this way:

          Enter Find Mode[]
          Set Field [SelectedvalueListTable::ReportFlag ; "*"]
          Omit Record
          Set Error capture [on]
          Perform Find []