1 2 Previous Next 21 Replies Latest reply on Aug 10, 2012 8:56 PM by LaRetta

    this is a bug in FM12?

    Draco

      In some records it calculates ... not in others.

      Is it a mistake?


      not display the number 1 (green field)

      <-)


      win xp

      fmpa12

       


      a1.png

      the fields are not empty.



        • 1. Re: this is a bug in FM12?
          LyndsayHowarth

          Both the fields used in the condition in the calculation have to be 10 and 5 respectively before it will calculate 1. Both fields have to be number fields.

           

          Sent from my iPad

          Lyndsay Howarth

          11th Hour Group Pty Ltd

          • 2. Re: this is a bug in FM12?
            Draco

            Yes Lyndsay, in fact are 10 and 5. The three fields are numeric.

            attach image

             

            a2.png

            PhilModJunk comenta :

            Your post in FMDev does not provide any info not posted here.

            If COD_ENS and COD_GRA are both empty for a given record, this calculation will be empty due to the selected option in the lower left corner of you dialog box. "Do not evaluate if all the referenced fields are empty". So that is one possible explanation as to why the field is empty. I can see where fields with these apparent names are present and have the needed values for 1 to appear, but we'd need to see this layout while in layout mode to be able to confirm that these are the correct fields and that they aren't accidentally set up to point to a related table occurrence or something.

            I'd also try reproducing this in a new file created from scratch. If it works correctly, may your file or a field index is damaged. Try recovering the file to see if the recovered copy evaluates the values correctly.

             

            • 3. Re: this is a bug in FM12?
              DavidJondreau

              It's not displaying a zero either, it's just blank. Could it be a formatting issue? Hard to say without seeing the file, but Phil's got a reasonable way of trying to fix it.

               

              FWIW, the If() is superfluous. All you need is the COD_ENS = 10 and COD_GRA = 5 in the calc box.

              • 4. Re: this is a bug in FM12?
                pthomas

                Hi Draco,

                 

                Have you tried saving a compacted copy of your database?

                 

                Could be that you have a corrupt index somewhere!

                 

                Cheers,

                 

                Paul.

                • 5. Re: this is a bug in FM12?
                  Draco

                  Thanks David, Paul,

                   

                  >FWIW, the If() is superfluous. All you need is the COD_ENS = 10 and COD_GRA = 5 in the calc box.

                  absolutely right, was an attempt to solve.

                   

                  >Could be that you have a corrupt index somewhere!

                  the base has been recovered (5 hours approx.)

                   

                  a3.png

                   

                  sorry for my English

                  Draco

                  • 6. Re: this is a bug in FM12?
                    richardsrussell

                    I agree that technically the "If" is superfluous, but if you're coming back to this calculation 5 years from now trying to figure out what you were doing, it would lead to quicker understanding. I think of it as internal documentation.

                    • 7. Re: this is a bug in FM12?
                      richardsrussell

                      Normally the result of your calculation would be displayed as the numeral "1", but you've got it displayed as a green box. There are a couple of ways of doing this. You might have used conditional formatting, or perhaps you had another calculation that produced a container result if the 1st calculation produced a 1. How DID you go about generating the green box?

                      • 8. Re: this is a bug in FM12?
                        Draco

                        > How DID you go about generating the green box?

                         

                        Hi Richard,

                        if I understand correctly, the question is about this box.

                        Apology, but they are only screen captures worked with fireworks.

                        Sure conditional formatting, and some "get function" can do something.

                        2.png

                        excuse my English.

                        Draco

                        • 9. Re: this is a bug in FM12?
                          richardsrussell

                          So I'm guessing that your conditional formatting is along the lines of this:

                           

                          Conditional Formatting.jpg

                          • 10. Re: this is a bug in FM12?
                            pthomas

                            Hi Richard,

                             

                            My assumption is actually that he just has a green box on the screen with no conditional formatting.

                             

                            The problem he is having is that it SHOULD have a 1 in it but it doesn't as shown in his screenshots in later posts, I don't think the colour of the field comes into the equation!

                             

                            Not sure why it isn't showing a 1, I would have thought it was due to a corrupt index somewhere.

                             

                            Draco - you said you recovered the file, have you also tried saving a compressed copy of the file to see if that helps?

                             

                            Cheers,

                             

                            Paul.

                            • 11. Re: this is a bug in FM12?
                              richardsrussell

                              Well, then, just to rule out the ultra-duh possibility, it isn't a case of green text on a green background, is it? Or white text on a white background?

                               

                              Another possibility is that perhaps the calculation is based on something upstream that isn't indexable. In that case, storage options for MAT_NT2 should be set to "Do not store calculation results -- recalculate when needed".

                              • 12. Re: this is a bug in FM12?
                                pthomas

                                I don't think that is the issue as Draco mentioned that the calculation is working for some records but not others!

                                 

                                It also seems to sort itself out when he removes the value from one of the source fields then re-enters the exact same value (further indication of a corrupt index I believe).

                                 

                                Cheers,

                                 

                                Paul.

                                • 13. Re: this is a bug in FM12?
                                  RobertWard

                                  Try using two statements.

                                   

                                  Case ( COD_ENS = 10 ; 0 ; 1 ) and

                                  Case ( COD_GPA = 5 ; 0 ; 1 )

                                  • 14. Re: this is a bug in FM12?
                                    Oliver_Reid

                                    1 you could use single calcuated repeating field using get(caculationrepetitionnumber) to govern that value pairs in the calc.

                                     

                                     

                                    2 But that does not explain the phenomeon: could you post the file?

                                    1 2 Previous Next