4 Replies Latest reply on Dec 16, 2009 12:00 PM by oldMster

    Running total + Blackout Days

    ACFlex Level 1

      I am looking for help with a couple of things, but first and most important is getting a Flex based form to SUM the fields.  I am new to Flex, and want/hope to be able to create a form that has various values in ComboBoxes, Text Input fields, NumSteppers that can be totalled or summed in another "Total" text area a sort of form calculator.  So far I am not seeing much math function.

       

      Picture an XLS form that has variable quantities and prices with a final cell that has a formula for =SUM(C1:C59)

       

      The other challenge I am having is with the DateField, I want to have a date selector that wont allow past dates or anything from today out 2 weeks...but I am not seeing the options of blocking a quantity of days, rather specific days of the week, which will not work for what I am trying to accomplish, it needs to do something like <mx:DateField x="15" y="15" disabledRanges="TODAY+14 days" or disabledDays="TODAY+14"/>

       

      Sorry in advance for my ignorance...thanks to anyone who can help point me on the right path!

       

      Rich

        • 1. Re: Running total + Blackout Days
          ACFlex Level 1

          Any ideas, anyone?  Is this out of the scope of the forum?

          • 2. Re: Running total + Blackout Days
            oldMster Level 3

            For the first one, you would need to create the 'total' display object, using whatever is appropriate ('Text' would be fine, since the user isn't ever going to enter the value)

            Then you need to create the Actionscript function to total the data elements that should be included in the total, and this function should update the value displayed in Text.text.

            To update as field change, you will need to add an event listener to each of the included objects to trigger the calculate function - I would probably use the focusOut event, but some others would work as well.

             

            For your second item, those are not standard features of the <mx:Date> component.  You will need to extend that component to add the features you want.

             

            Mark

            • 3. Re: Running total + Blackout Days
              ACFlex Level 1

              Can anyone provide a good source to refer to for creating custom/extended components?

               

              I am new to programming, and new to Flex, so unfortunately I believed the marketing hype that this was an easy platform, and have run into roadblocks on the very first piece of functionality that I am trying to build.

               

              Thanks for all your help so far!

               

              Rich

              • 4. Re: Running total + Blackout Days
                oldMster Level 3

                Well,

                It isn't hype, Flex is a very easy programming environment to become productive in.  However, it IS a programming environment, and if you new to programming, and don't expect it to be difficult at times, then you will be frustrated for a very long time.

                 

                There are several examples of extending components in the tutorials (have you done the 'flex in a week' Adobe TV serie? If not, I highly recommend it). 

                 

                I would start with the <mx:DateChooser> component - it has most, if not all, of what you were looking for, disable days, disable ranges, etc.

                 

                Mark