12 Replies Latest reply on Oct 20, 2016 4:14 PM by ChrisJohnston

    Child update parent mod date?

    ChrisJohnston

      I was curious to know if when a portal in a record receives any change if its parent records modification date changed. I have a need for this now. It seems like it does not. Are there any strategies for making it show updates in the timestamp in an Auto Enter Modification Date? I could construct a way to do it via a script. However I don't want to miss something FileMaker does already (which I always seem to do). Thanks

        • 1. Re: Child update parent mod date?
          philmodjunk

          You'd need to script the update from a trigger on the child record.

           

          OnCommitRecords perhaps.

          1 of 1 people found this helpful
          • 2. Re: Child update parent mod date?
            BruceRobertson

            Very dubious proposition. Why do you think you need to do this?

            1 of 1 people found this helpful
            • 3. Re: Child update parent mod date?
              philmodjunk

              Hmmm, an unstored calc with a date or timestamp result type that computes as:

               

              Max ( Child::modField )

               

              Might serve...

              1 of 1 people found this helpful
              • 4. Re: Child update parent mod date?
                BruceRobertson

                Perhaps this applies. What is it you really need to do? WHY do you think you need to store this  info in the parent record?

                 

                XyProblem - Greg's Wiki

                 

                • User wants to do X.
                • User doesn't know how to do X, but thinks they can fumble their way to a solution if they can just manage to do Y.
                • User doesn't know how to do Y either.
                • User asks for help with Y.
                • Others try to help user with Y, but are confused because Y seems like a strange problem to want to solve.
                • After much interaction and wasted time, it finally becomes clear that the user really wants help with X, and that Y wasn't even a suitable solution for X.
                1 of 1 people found this helpful
                • 5. Re: Child update parent mod date?
                  keywords

                  I have always thought Modification Date was a bit pointless—all it shows is that something was done that was viewed by FM as a record modification. A modification could be simply cutting the contents of a field, then pasting those same contents back in again—no material change to the data, but a modification as far as FM is concerned. If you really want to keep track of changes that are made you need an audit trail log.

                  1 of 1 people found this helpful
                  • 6. Re: Child update parent mod date?
                    ChrisJohnston

                    I see, and figured this. I guess just a touch (go into a field and exit), like it is called in other technologies would good?

                    1 of 1 people found this helpful
                    • 7. Re: Child update parent mod date?
                      philmodjunk

                      There is an onObjectSave trigger that is only tripped if the data in a field is changed followed by exiting the field.

                      2 of 2 people found this helpful
                      • 8. Re: Child update parent mod date?
                        alangodfrey

                        Brilliant, BruceRobertson!

                        1 of 1 people found this helpful
                        • 9. Re: Child update parent mod date?
                          ChrisJohnston

                          This checklist   has value. I like it. I think the question is what type of person is reading it and how they will use it. I am the type of person that does not mind the theory or rhetorical-ness of a question. Because that has led me far with computer technology. Being experienced with computer technology, I would caution some users not to think that their immediate need is the best answer, or think they cannot ask a question if they don't know what they are doing. However for efficiency I would say it make some sense. Sometimes I know what I want to do, have done it and I ask the question anyway. You, philmodjunk, and many others have answered my questions extremely well in the past. What I mean by extremely well is besides leading me to my answer, helping me visualize what is possible. Some of the answers here already have made see things more clearer. Thanks.

                          1 of 1 people found this helpful
                          • 10. Re: Child update parent mod date?
                            ChrisJohnston

                            I was considering an audit trail. I was also thinking that a scripted workflow would assure the records I want to show updates the way I want. Thanks

                            1 of 1 people found this helpful
                            • 11. Re: Child update parent mod date?
                              BruceRobertson

                              Yet another approach is to have a relation to the child records that is sorted descending by the mod date field of the child records. Then you can just display this field on the parent record. Being sure to set the field to allow entry only in find mode. Or display it as a merge field.

                              But here, again, note that you really have not described how you hope to use this field. Merely to display it? To perform finds? Other?

                              1 of 1 people found this helpful
                              • 12. Re: Child update parent mod date?
                                ChrisJohnston

                                That is a good idea also, I will bank it for when needed. I think are best solution is to create some type of a history. In a child record, we are retrieving data via PHP. We are currently using one child record for fetching results… that is each time. This data is later sent back to a server. At this point, we can delete the records doing the fetching, and I recommended so and they went with it. So I want to make sure the parent record reflects that changes were made. Thanks