Method Community

 

Dropdown Values

Last post 12-04-2012 1:57 PM by bcr_garrett. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-04-2012 1:09 PM

    Dropdown Values

    I am having strange math behavior when adding values from two "Quantity" dropdowns - not sure if this is a bug, or error on my part.
    For testing purposes
    ,
    I have two sets of two dropdowns that point to a quantity table with values 1-10 (see attached screenshot).  I have actions setup that add the values from the dropdowns together, and put the sum in the corresponding textbox to the right.
    The problem comes when using Basic Math, and getting "Values From Screen."  For some reason, I am consistenly getting a value off by +2 (see "Value" example).
    I have since switched the "Quantity" example to "Retrieve Values From Screen."  This works, but requires more lines...and I would like to know why "Basic Math Calculation >> Value From Screen is not working the same (since they are both taking values from the screen).
    Any ideas?

    Thanks,
    Garrett

    Dropdown Math - Screenshot

  • 12-04-2012 1:39 PM In reply to

    • Matt
    • Top 10 Contributor
    • Joined on 11-04-2008
    • Posts 877

    Re: Dropdown Values

    Answer

    Garret,

    This is just a guess...

    It looks like when you are adding the value from the screen, it is using the recordID as opposed to the text value of the field. You can test this theory by seeing if your RecordIDs are off by 1 number in the table that contains 1-10. For example the number 2 would be recordID 3.

    When you use the retrieve value from screen action, you have the choice to select the dropdown attribute, with the basic math calculation, you do not have this option.

    Hope thats makes sense.


    Matt Raiser

    Founder,



    www.techinthefield.com

    matt@techinthefield.com

    219-221-9500



    ~ Method user / partner since 2008

    ~ Over 15 years field service experience

    ~ 2013 Method Partner of the Year

    ~ Degree in Computer Science





    Creator of:


        


  • 12-04-2012 1:57 PM In reply to

    Re: Dropdown Values

    That makes perfect sense - and it would explain the occurance.
    It seems strange to me that the action "Value From Screen" would not grab the actual value on screen...at least I have a working method.  Thanks for the help!

Page 1 of 1 (3 items)