1 2 Previous Next 15 Replies Latest reply on May 12, 2015 10:49 AM by TSGal

    Validation problem with GetFieldName()

    PeterWagemans

      Summary

      Validation problem with GetFieldName()

      Description of the issue

      When GetFieldName(unrelated occurrence::field) is used in a formula, it causes any formula validation to fail when there is other stuff following in the same formula. The error raised is "Parse Error".This is quite a mouthful. So let me explain with a few examples: 1.  GetFieldName(unrelated occurrence::field) -> OK2.  GetFieldName(related occurrence::field) -> OK3.  GetFieldName(related occurrence::field) & abs ( 1 ) -> OK3.  abs ( 1 ) & GetFieldName(related occurrence::field) -> OK 4.  GetFieldName(unrelated occurrence::field) & abs ( 1 ) -> Parse Error5.  abs ( 1 ) & GetFieldName(unrelated occurrence::field) -> OK "abs(1)" is just the the first thing that comes to my mind ( and in the function list ). In fact any expression will do.  Workaround: 1. relate the unrelated occurrence tot the calculation environment with a dummy relation2. validate the formula3. remove the the relation again4. the formula will continue to work, this also proves that this is just a formula validation issue Being able to obtain the field name of an unrelated occurrence is very much needed for example when constructing SQL statements using myFMbutler DoSQL. The function GetFieldName() provides an abstraction, this is better then providing literal fieldnames because the formula would break if the fields are renamed afterwards. FileMaker Development is aware of this functionality and has already fixed another bug when using unrelated occurrences. 

        • 1. Re: Validation problem with GetFieldName()
          PeterWagemans
            

          I wonder what happens with these bug reports.

          I don't consider it an improvement over the Black Hole reporting system we had previously, and I'm not inclined to put more energy into posting bugs if nobody at FileMaker takes the time to reply, as I'm not sure they even read them. 

          • 2. Re: Validation problem with GetFieldName()
            philmodjunk
              

            "I'm not inclined to put more energy into posting bugs if nobody at FileMaker takes the time to reply, as I'm not sure they even read them. "

            I share your frustration in the recent lack of attention some forum areas are currently getting. Judging from some comments made by TSgal, they  seem a bit undermanned for supporting the Forum at the moment.

             

            However, if you go back a bit through the threads in this forum, you will see that they do read these posts and do respond. The resulting exchanges have helped any number of users confirm whether they are dealing with a bug, a limitation, or just didn't set something up correctly.

             

            In fact a GetFieldName() bug report was posted not terribly long ago.

            • 3. Re: Validation problem with GetFieldName()
              PeterWagemans
                

              Phil, thanks for this reply. 

              I started to follow the bugs forum by adding the RSS to my ( Apple Mail ) client. Here's the number of reports per day of the last week:

              yesterday: 3 bug reports

              june 18: 4

              june 17: 3

              june 16: 0

              june 15: 4

              june 14: 1

              june 13: 1

              june 12: 3

              june 11: 3 

              I wouldn't call that a large amount. How many people would it take at FileMaker to give a short answer to people who take the time to report bugs to them?

              Especially when FileMaker people get clear and concise descriptions with lab scale examples handed on a silver platter, they should encourage this by at least giving a standard reply. Not doing so is simply unprofessional.

              End of rant. I feel better now. 


              PhilModJunk wrote: 

              In fact a GetFieldName() bug report was posted not terribly long ago.


               

              Well, I did a search for GetFieldName and did not find any report describing the problem. I tried it again now, and did not find any new material. A lot of posts on "Set Field By Name", a "self" problem in field definition calcs and some other stuff, but no other GetFieldName() bug report.

              I also see that the lack of results in such a query is basically our own fault. We should report only 1 problem at a time and use the tag system, to keep the signal to noise ratio high.

               

              I found another workaround for this particular problem.

              Apparantly the validation error pops up when you start using FileMaker functions.

              But not custom functions!

              So I get around it as wel by making a custom function that simply does a FileMaker function.

              In the example above with the Abs() function, replacing it with a custom function cf_abs() makes the validation error disappear. 

              • 4. Re: Validation problem with GetFieldName()
                LaRetta_1
                  

                I agree with you.  Before, we posted a bug report into a black hole and never knew if it was even read.  When this site was opened and we were getting responses, I was quite impressed that we were at least getting acknowledged that the report was read by them even if they could not give an immediate solution.

                 

                I also know that TS Gal was quite busy when Bento opened and maybe still is.   But we don't know if our post was missed entirely when it doesn't even get a quick response.  Something similar to "It's already been reported here" or "thank you, we'll check into it" doesn't take long to write.

                 

                There are other major bugs sitting here without any kind of response as well.

                • 5. Re: Validation problem with GetFieldName()
                  philmodjunk
                     When I click the Advanced tab and enter "GetFieldName", I get three pages of matching forum entries. Here's one: GetFieldName Function
                  • 6. Re: Validation problem with GetFieldName()
                    LaRetta_1
                      

                    Oh!  But a new person looking for answers would type GetFieldName in the search.  I think it is unrealistic to think everyone will know to search Advanced.  I didn't - when it didn't give results the regular way with that string.

                     

                    So I guess my question is, Phil, what was your point?  That a person shouldn't ever expect an answer because somewhere out in cyberspace or nanoland, there was already a post about the bug?  Again ... it takes very little time to say, "We know about it, thank you though." 

                     

                    Maybe FileMaker can automate a response post to everyone who posts a bug saying it will be investigated.  At least we'll feel we are heard even though, when we see it's an automated response, we might doubt it's been viewed.  But at least we'd have SOMETHING to get ahold of.

                    • 7. Re: Validation problem with GetFieldName()
                      LaRetta_1
                         By the way, there are only two posts ... this one and another.  And the other post wasn't answered by FileMaker either and there was no solution listed nor discussed.
                      • 8. Re: Validation problem with GetFieldName()
                        philmodjunk
                          

                        I was just trying to show a better method of searching the forum. I used to get very frustrated when I tried to search the forum until I learned how to use the Advanced search option. I now mention it to others every chance I get in an effort to ease the frustration level.

                         

                        If you read all my posts in this thread, you'll find I agree that we need more participation from the FM tech folks on this part of the forum.

                         

                        Even without FM tech participation, posting bug reports here is much nicer than "shouting down the well" with the old report form. At least we can help each other out with confirmations and work-arounds.

                        • 9. Re: Validation problem with GetFieldName()
                          LaRetta_1
                            

                          Oh I agree, Phil, that you mostly agreed :smileyhappy: but saying there were other threads about the issue implied that this thread shouldn't have been started since there were already other threads about it (you implied several).  I was just clarifying that 1) there were not several other threads and 2) the ONE other thread (whether you searched regular or Advanced) didn't offer a solution nor even an acknowledgement  from FM.  I can only go by your wording, not your intent ... that's the problem with posts but also why it is necessary to be concise when responding (and no, I don't always succeed either).

                           

                          "At least we can help each other out with confirmations and work-arounds."

                           

                          Well, we had that on FM Forums (as well as others).  The purpose of the 'official' FM bug site was, I would think, so that FM could be visible, offer input and eliminate the black hole. :smileysurprised:

                          • 10. Re: Validation problem with GetFieldName()
                            TSGal

                            clarifix:

                             

                            Thank you for your posts, and I apologize for the late reply.

                             

                            Thanks to PhilModJunk and LaRetta for your comments.

                             

                            Yes, the "Report a Bug" board has been neglected, and I'm slowly catching up.  All other boards are "up-to-date".

                             

                            I am unable to duplicate the problem.  This is what I have done.

                             

                            In a layout based on table A, with no relation to another table, I created the following script:

                             

                            Set Variable [ $var1 ; GetFieldName ( b::field )

                            Show Custom Dialog [ "test" ; "test" ]

                            Set Variable [ $var2 ; GetFieldName ( b::field ) & Abs (1)

                            Show Custom Dialog [ "test2" ; "test2" ]

                             

                            When I run the script, I do not receive an error of any sort.

                             

                            "b::field" is a text field that is NOT global.

                             

                            Please let me know how I can duplicate the problem, and once I can duplicate it, I will make sure it gets reported.

                             

                            TSGal

                            FileMaker, Inc. 

                            • 11. Re: Validation problem with GetFieldName()
                              PeterWagemans
                                

                              Hi TSGal,

                               

                              Thanks for answering, and for your disarming honesty as well.

                               

                              This is something I forgot to mention in the initial post. These example formulas are entered in the field defintions, and not in a script - and you have been testing them using scripts. Sorry for that - it turns out to make a big difference.

                               

                              So if you try the same stuff you did, but in the field definitions, I'm sure you will be able to reproduce the problem.

                               

                              Thanks! -- peter 

                              • 12. Re: Validation problem with GetFieldName()
                                LaRetta_1
                                  

                                TSGal wrote:
                                 

                                Yes, the "Report a Bug" board has been neglected, and I'm slowly catching up.  All other boards are "up-to-date".



                                I suggest you talk to your bosses about changing the priorities.  The Report A Bug forum should hold TOP PRIORITY.  ALWAYS.


                                • 13. Re: Validation problem with GetFieldName()
                                  TSGal

                                  clarifix:

                                   

                                  Thanks for the clarification.  I can definitely duplicate the problem, and I have forwarded your post along with my findings to our Development and Software Quality Assurance (Testing).  When more information becomes available, I will let you know.  In the meantime, one workaround is to one calculation field to store GetFieldName (unrelated table::field), and then create a second calculation field to reference the first calculation field and concatenate the function.

                                   

                                  TSGal

                                  FileMaker, Inc. 

                                  • 14. Re: Validation problem with GetFieldName()
                                    edusouza
                                      

                                    Hello, Clarifix; hello, all,

                                     

                                    Just one cent -- not two -- this time. I began using FileMaker Pro a long (I mean LONG) time ago. The first version I fooled around with was FileMaker PLUS (the father or mother of them all), which came bundled with the first Mac I acquired -- I don't remember if it was the 512 or Plus model.

                                    I began to develop using version 2.5, which wasn't even relational, yet, and gave myself a break (from developing) when FMP reached version 5.5.

                                    In the beginning of my FileMaker escapade, I could barely communicate with the developers -- if such, only by letters. When version 2.5 came around, Claris (later FileMaker, Inc.) had a toll free number for users to call. As a registered user, you would have some ridiculously short time to have all your questions answered; if you hadn't, then you would have to pay an annual fee to have help.

                                     

                                    I actually used this service, and -- believe it or not -- I'd pay international rates (I used to live in Brazil) on doing so.

                                     

                                    I don't know about you, but I believe FileMaker has evolved a lot since then. I've been reading most of the posts in here; just the fact there's actually a person whose knowledge is so wide and deep s/he may actually help rookies, amateurs (such as myself), as well as pros tells me FileMaker, Inc. is getting much more serious about their costumers.

                                    Nonetheless, I agree with the comment Bugs should have a priority; on the other hand, when someone has a snag, it becomes a priority for this person.

                                    That's human nature, so I will not extend on this matter.

                                     

                                    Enough said about the subject, just a little remark to something Clarifix wrote:

                                     


                                    ... 

                                    I found another workaround for this particular problem.

                                    Apparantly the validation error pops up when you start using FileMaker functions.

                                    But not custom functions!

                                    So I get around it as wel by making a custom function that simply does a FileMaker function.

                                    In the example above with the Abs() function, replacing it with a custom function cf_abs() makes the validation error disappear. 


                                     

                                     It is funny you said that, Clarifix, for I had problems with the trigonometric functions in the past (v.9.0), hence I developed custom functions to take care of the job. A good thing about them is their portability; so wherever FileMaker goes in the future (I've seen its past, and how it has changed since then), as long as it holds custom functions, a developer may be able to re-use them.

                                     

                                    Best wishes to you all,

                                     

                                     

                                    E* 

                                    1 2 Previous Next