6 Replies Latest reply on Mar 4, 2013 7:36 AM by argasoft

    Field with calculated value not visible.

    argasoft

      Title

      Field with calculated value not visible.

      Post

           Hi!

           On a offer layout I have a portal to input the single lines of the bid with the following fields/operations:
           - sector is a custom value list to have only matching relation in
           - item. I choose from this drop-down to have
           - list_price which is a number, calculated value field, "do not replace..." unchecked, always evaluated
           - price (number, manual entry allowed) populated by means of Set Field [] in a trigger when exiting item

           Beahaviour:
           - list_price is not shown
           - price is shown i.e. list_price is not empty or zero (monitored also with data viewer)

           I want to see list_price and price to digit original price after modifying price.

           I have otther calculated value fields in the portal using values in the layout and they are ok.
           In the portale I have also a row_total field which contains the correct calculated value.

           More infos:
           - deleting a portal row with Delete Portal Row [] all fields are deleted but list_price appears
           - list_price was inserted in the portal after its creation (as another calculated value field which works fine)
           - list_price has no conditional formatting
           - sometimes switching from Browse to Layout and back to Browse list_price appears
           - I've tried also with Refresh Window [] after Set Field [] with no success
           - settings in Inspector and others of the fields list_price and row_total are the same (calculations of course not)

           I'm missing something(s) but what?

           Thanks for any hint.

           Arnaldo

           P.S. Hope it's clear. I've made my best to translate from italian.
            

        • 1. Re: Field with calculated value not visible.
          JimMac

               Very clear english.yes

               In the layout mode for that Portal, the field list_price in not completly inside the Portal Row definition.

               You may have to Maginify or Zoom in to see the field rectangle is slightly outside the Row enclosing rectangle.

               Jim...

          • 2. Re: Field with calculated value not visible.
            argasoft

                 Hi, Jim!

                 Thanks for reply.

                 In fact, I already thought this could be and checked position via Inspector and Top Position and Height of list_price (not visible) are the same as price (visible) as well as all other fields in Portal.

                 I've just changed line spacing for list_price to zero (it was set to 1) as set for price, and, voilà, list-price now appears (btw both are and were with right adjustment).

                 Why does it happen?
                 Do I have to specify a "maximum number of characters" for the field instead of setting line spacing to zero?

                 Now, if I delete the Portal Row via script, all is deleted. So it seems I've been able to explain to FM what I want.

                 Thanks again

                 Arnaldo

            • 3. Re: Field with calculated value not visible.
              JimMac

                   This is caused because the length of the result of the calculation, is longer that the width of the enclosing rectangle [for the specified Font Size/Style].

                   Since calculation fields cant be modiied, you can't SEE the results.  Results are there, but scrolled up out of view.surprise

                   Try a smaller font or stretching the Calc field to be Wider.

                   Jim...

              • 4. Re: Field with calculated value not visible.
                argasoft

                     Font, size and style of list_price and list were the same (Courier New, 10, Bold, field width 51pt, height 15 pt, fixed 2 decimals, thousands separator). This is enough for values up to 9.999,99 (max value for both fields is actualy around 200,00 and will arive to 9.999,99 decades after I'm gone).

                list_price is not a calculated but a number field with calculation formula given in field definition and field entry unckecked. The formula is something like
                     If ( item <> "" ; Round ( valueA * valueB ; 2 ) ; "" ).

                     If the result is so big that it can't be visible in the " too small" field list_price, why does it appear in price after Set Field []?

                     I've stretched list_price up to around 200 width and 150 height, after setting line spacing to 1 and nothing appeared.

                     All this is just to understand how I have to speak to FM to explain my will (I'm a skilled RPGII and RPGIII programmer and knows somethin about databases, relations, etc.)

                     Thanks a lot, Jim.

                     Arnaldo

                • 5. Re: Field with calculated value not visible.
                  JimMac
                       

                            More infos:
                            - deleting a portal row with Delete Portal Row [] all fields are deleted but list_price appears
                            - list_price was inserted in the portal after its creation (as another calculated value field which works fine)

                       

                            This comment is what was driving my suggestions.  List_Price appears to not be part of the Portal since it was NOT deleleted.

                       

                            Double check the relationship graph and perhaps the change to 0 iines adjusted the height correctely.

                       

                            Since I dont have a copy of your DB, I can only act as informed listener.  I never meant to imply your knowledge of FMP was limited.  Your first post was abundantly clear on you troubleshooting skills.

                       

                            It sounds like it is now working, but I have never had to resort to your "work around" solution.

                       

                            Good Luck with FM...

                       

                            Jim...

                       

                            PS:  if you find a reason in future, let the forum know of it.

                  • 6. Re: Field with calculated value not visible.
                    argasoft

                         Never felt your comment offensive to me. My last sentence was just an info about my knowledge about databases admitting my difficulty in learning a "new language".

                         Sorry for the misunderstanding.

                         Thanks a lot again.

                         Arnaldo