5 Replies Latest reply on Jul 6, 2017 11:31 AM by ZoocMan85

    Fields Not Clearing

    ZoocMan85

      So yesterday i added a new calculation on my two price fields. Here is a screen shot.

       

      Screen Shot.jpg

       

      Here is the calc

      Case (

      TypeBeerSelect = "Bottle"; Brew_Settings::SalePriceBottle;

      TypeBeerSelect = "Can"; Brew_Settings::SalePriceCan;

      TypeBeerSelect = "Draft"; Brew_Settings::SalePriceTap;

      )

       

      There is a table called brew settings that stores all my beers that i customized, Type 1 and Type 2 Boxes are part of the Active Brew List Table.  The current screen shot is taken from the active brew list layout. The reason for the change on my price fields was due to the fact if i changed prices in brew settings, it wouldn't reflect on here. You would have to manually delete the record and re add it. Although this worked , it created another issue.

       

      If i click on the record in slot one and replace it with another item from the Beer Select drop down, Everything on record changes except Type fields in the portal don't clear from the last beer. I don't know what to do.

        • 1. Re: Fields Not Clearing
          Jason Wood

          Could you explain in more detail what the two tables are used for? What types of fields are in each? What the records represent? How are they related?

          • 2. Re: Fields Not Clearing
            brucewilson

            It sounds like your price fields are not actually calculation fields, but just number fields with an AutoEnter calculation or Lookup. In that case you need to do something that will trigger the relookup or recalculate.

            • 3. Re: Fields Not Clearing
              ZoocMan85

              Here is a screenshot of the relationships.

               

               

              The flow of this is as followed. You add your beers in brew settings, Price, if you carry it in Can, Bottle, Draft. Then you have an active check box. If the active check box is checked, then on the active brew list layout, its filtered out in the drop down menu under beet selection.

              Screen Shot.jpg

               

              Here is a screenshot of Brew Settings layout.

               

              Brew Settings.jpg

              • 4. Re: Fields Not Clearing
                ZoocMan85

                Once you are finished on that screen , you go to the mug club list page. Thats where you make your brew list. So the two price field in portal window are both calc fields, the type fields are not calc fields, just standard text fields. So to recap the issue im having is if i click on a beer in slot 1, 2  or, 3 to change it, if previously had Bottle ,Can, Or Draft in any of the type fields, the prices will delete but the type will stay. They should be being deleted on the switch and then the user reselect the correct type for that particular beer.

                • 5. Re: Fields Not Clearing
                  ZoocMan85

                  So i still cant figure out why its doing that but i came up with a solution .

                   

                  Screenshot.jpg

                   

                  Basically after a beer is changed , this script is set to run on object modify,