9 Replies Latest reply on Jan 6, 2015 12:56 PM by philmodjunk

    Message from calculation

    tays01s

      Title

      Message from calculation

      Post

      I've got some biochemical parameters. Combinations of 1 or more indicate certain disease states. I'd like a 'message' indicating the state to appear when particular combinations occur. These I'd calculate from whether the parameters are above/below normal.

      How would I best do this if:

      1. I just wanted a message in the context of the current selected record?

      2. I wanted to keep a record of disease state; would I have to create a field for each potential disease state?

        • 1. Re: Message from calculation
          philmodjunk

          1) A case function could be used in a calculation field for this purpose. It might also be possible to set up a related table of such "messages" and if your parameters fall within certain value ranges, your record matches to a particular message record and that message then appears on your layout. (this second option takes more work to set up, but allows you to update parameter ranges and messages without having to redefine a calculation field.)

          2) What is a disease state? We know databases here, not your subject matter. wink

          Answering from that level of ignorance, if you are recording the progression of a particular disease over time, you probably would create a series of related records to log the progression and/or treatment of the disease. You'd add a new related record at periodic intervals or each time the disease state changes.

          • 2. Re: Message from calculation
            tays01s

            A couple of things I should mention:

            1. I'd like this to be entirely automatic and

            2. Invisible when not meeting 'disease criteria'.

            So it would be a bit like a car dashboard where the speed and fuel level are always visible, but it something goes wrong, a warning light goes on with an explanation. However, under normal conditions that warning light would be invisible a) to avoid clutter/distraction and b) to make it more noticeable when activated. It's te visible/ invisible bit I'm not sure of. Might the only way to deal with it, as previously mentioned, be to have a field for each 'disease' (say infection), normally blank and use conditional formatting to bring the 'message' to the users attention. Blank is as near to invisible as I can think of; can you make fields appear/disappear?

            • 3. Re: Message from calculation
              philmodjunk

              Both methods previously described would be entirely automatic and both would not show anything if values do not fall within specified ranges.

              I do not see a reason at this time to have separate fields for each disease, but keep in mind that I still have only the most rudimentary understanding of what you want to do here.

              • 4. Re: Message from calculation
                tays01s

                OK, but to what would I attach the calc, ie. what kind of 'object' would it be?

                • 5. Re: Message from calculation
                  philmodjunk

                  You have multiple options.

                  It can be a calculation field with a text result type. This is probably the simplest method for someone new to FileMaker.

                  It can be layout text placed on the layout with its visibility controlled by either a "hide object when" property or a conditional format expression.

                  It can be text in a field that is updated via a script performed by a script trigger.

                  It can simply be a field that you place on the layout from a related table of messages. This assumes that you set up a relationship that is a valid match to the correct record when the values of specific fields in your record fall into ranges that you specify.

                  It can be a field from that table placed in a filtered portal where a portal filter helps control whether or not a related record (and it's message field) appear or not.

                  • 6. Re: Message from calculation
                    tays01s

                    Thanks for the suggestions. Because I am a beginner and think it may be useful keeping a record of when these disease states occur, I'll use a field per disease state and conditional formatting to make them 'blank' when not relevant.

                    I'm assuming: "It can be a field from that table placed in a filtered portal where a portal filter helps control whether or not a related record (and it's message field) appear or not."

                    can be used only with FM13, not 12 (something mentioned in a previous post).

                     

                    • 7. Re: Message from calculation
                      philmodjunk

                      Multiple separate fields are probably not an optimum design here, but since I'm not an expert in your subject area, I might be incorrectly understanding the details involved.

                      I'm assuming: "It can be a field from that table placed in a filtered portal where a portal filter helps control whether or not a related record (and it's message field) appear or not."

                      can be used only with FM13, not 12 (something mentioned in a previous post).

                      That is not the case. This can be readily done in FileMaker 11, let alone 12. And we had ways to do this in older versions with a bit of added effort.

                      • 8. Re: Message from calculation
                        tays01s

                        Sorry, for some reason I picked the wrong sentence; I'd meant: "It can be layout text placed on the layout with its visibility controlled by either a "hide object when" property or a conditional format expression."

                        I thought "hide object when" only came with FM13; I've not found it on FM12.

                        • 9. Re: Message from calculation
                          philmodjunk

                          Hide Object When is a new feature in FileMaker 13. In older versions, you can use conditional formatting to make text invisible. The simplest, if text is in the10-12 point range and in a single row of text, is to use a conditional format to set the text to have a font size of 120+ points.