10 Replies Latest reply on Apr 27, 2017 10:36 AM by Gazz

    Calculating Costs in Offerings

    Gazz Apprentice

      I have create an offering where a customer can select various items to purchase  e.g. USB stick (Check Box) and then select the quantity they require (Dropdown list 1- 5).

      The issue I have is that I cannot for the life of me figure out how to setup the pricing if they select multiple of the same item..


      If they select say 1 USB stick the cost would be 2 however if they select 3 the cost would be 6. Where, how and can this be done? I'm more than happy to change the control I am using if there is a better solution out there.



        • 1. Re: Calculating Costs in Offerings
          rspahr@communitymedical.org Rookie

          Create your item with pricing in "Price List" module.

          Go into your request offering and add a Boolean for the item under Field Options select the "Price"  from your price list. 

          Create a Text Field next to it for quantity set the type to "Number" and set default value to 0

          Go back to your Boolean field and go to price expression, select your quantity field you just created in the drop down.

          Now you have a Boolean (I want this) linked to a "how many" and it will drive the cost. 



          #1 In IE 10 or lower when customers click the +/- it double jumps quantity, this doesn't happen in Chrome for us however. 

          #2 the drop down for quantity doesn't look at the field name it looks at the description which is fun when you have 30 items and you want them all to say quantity. How we circled this issue is that our quantity field has the item name in it. It's not pretty, but it was the only way to get it working without jumping out of a window on our Purchasing Offering since we have 80ish items on it.

          #3 You cannot use visible expressions on any items to have them "dock" like the old self service. You will get field errors, you have to have all objects visible at all times.


          Those are the hurdles we crossed, but if your not super committed to using a combo box for quantity that should work for you.

          Best of Luck!

          • 2. Re: Calculating Costs in Offerings
            ford_sb Apprentice



            I ran into the same hurdle with multiple fields labelled "Qty" and also wanted avoid having to name them uniquely. I found that you can create multiple fields named Qty, but give them each a unique identifier (last selection on the details). Then, instead of selecting the field from the list of available fields when assigning it as the Qty identifier, type the unique ID where the field name would appear after it is selected.

            1 of 1 people found this helpful
            • 3. Re: Calculating Costs in Offerings
              ford_sb Apprentice

              This is how I did it.


              The form allows you to check the computer you want and enter a quantity, all of the quantity boxes are labelled "Qty" on the form:





              Each quantity box has a unique ID matching the item it's modifying. These are the 2 boxes above:








              This is the configuration for the checkbox next to the computer model. The trick is in the Quantity field, just type or paste in the unique ID for the qty box. The labels are displayed in the drop down menu, and on the right, but you can paste in the unique ID. If you go back and look at it, it will be replaced with the label (Qty) but will work, as the first picture indicates.


              1 of 1 people found this helpful
              • 4. Re: Calculating Costs in Offerings
                Gazz Apprentice

                Hi Steve,


                How did you create the layout for your the pages. Its very neat however I cannot find a way of replicating this.



                • 5. Re: Calculating Costs in Offerings
                  ford_sb Apprentice

                  Thanks Gary   This is the basic method:


                  I added a graphic, a checkbox, and a text field for the quantity like this:







                  I then clicked the "Layout Configuration" button to the upper-right of the form designer and set it like this:




                  That puts the graphic, checkbox, and qty field all on the same row.

                  I set the Qty as the price modifier as posted above.


                  The last little bit of logic I'm working on is the checkbox/quantity mechanic. If the box is checked, it implies you want one, so the qty field should at least have a value of 1. Conversely, if you enter 0 in the quantity field, the checkbox should turn off, and if you enter something greater than 1, I'd like it to automatically check the box. This all just avoids a submission where they checked a computer with 0 quantity, or set a quantity, but didn't check the box, so it wouldn't come through on the request.

                  • 6. Re: Calculating Costs in Offerings
                    Gazz Apprentice

                    Thanks Steve, I managed to figure it out after I messaged you. 


                    Have you managed to figure out a method of excluding the non selected items from the submit and review page. The item shows up even when not selected, last item which is the desktop, can this be hidden?Non seleted items

                    • 7. Re: Calculating Costs in Offerings
                      ford_sb Apprentice

                      No, I hadn't thought about removing them from that screen. I figured the point of that screen is to see all the selections at once to make sure you picked what you wanted and didn't pick what you don't. When the request comes through, I figured I'd add a tab that only grabs the selected items to make it easier to see what was actually ordered.

                      • 8. Re: Calculating Costs in Offerings
                        Gazz Apprentice


                        Have you encountered the issue on the review page where the items are all misaligned as below? I have fiddled with various settings however the final page always displays as below.


                        • 9. Re: Calculating Costs in Offerings
                          ford_sb Apprentice

                          I haven't found a way around that either. I thought maybe it was a field width/height thing, and tried moving the label to the graphic instead of the checkbox, but the vertical alignment happens regardless. We're in the middle of migrating to this version, and this is the only real disappointment I've had so far, since everything else is so customizable. I've read about people altering the .css or .js files to better control layout, but that would only work on prem - we don't have access to that in the cloud version, not that I would necessarily go that route.


                          I also played with the multi select field, but can't find any great way to deal with quantity, and I don't like the x dollars per month displaying, even if it's 0. It does come through the review and submit page exactly as pictured in the form though. If I find something, I'll be happy to reply.


                          • 10. Re: Calculating Costs in Offerings
                            Gazz Apprentice

                            Hi Steve,


                            FYI, I found a method to sort out the alignment on the review page, thought it may help..


                            I added a row alignment in between each item...see below

                            Result: It seems like the spacing are causing the issue so splitting them completely is the way to go.