facebook

calulation

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #339191 Reply

    philipdk
    Member

    hi
    i need help
    i am trying to make a health app and need the person to enter 2 sets of numbers,
    then i need to put a math formula in and have the answer displayed in the 3 box.

    i have 3 textfields but i dont know if i have it right and how to put the formula in
    and to get the answer.

    #339196 Reply

    nvts
    Member

    Hello,

    I created a sample app for another user a while back that has calculations in it. This should help with what you are asking. Down load the app and look in the app_custom.js file to see the javascript.

    http://www.genuitec.com/support-genuitec/viewtopic.php?f=8&t=5339&start=10

    Cheers…

    #339199 Reply

    Stu Wade
    Member

    A quick three ha’pence worth… If the formula is at all complex, Google ‘JavaScript Math’ to determine the syntax for the more tricky functions.

    Hope this helps.

    #339205 Reply

    Brandon
    Member

    Without knowing your box names or what formula you need here is a quick sample of what it might look like. You could place this in a button action Run Javascript.

    var myNumber1 = $(‘#m1-myscreen-textField1’).val();
    var myNumber2 = $(‘#m1-myscreen-textField2’).val();

    $(‘#m1-myscreen-textField3’).val(myNumber1 + myNumber2);

    #339208 Reply

    philipdk
    Member

    thanks for the help,
    but i am new to the whole programming side,
    did some visual basic, which was easy
    but i purchased this as it was a visual program
    and with you have given me is good
    but where do i put it, or how do i put it in.

    i am doing this as these formula’s are known
    to the diabetes educators and i was wanting
    to give this to everyone to help them,
    but what you have given me is with this
    program is easy to you but to me a beginner
    is really hard.

    thanks anyway

    #339209 Reply

    nvts
    Member

    I do not mind helping.

    Create the screen as you want and upload a screen shot with the calcs you are wanting and I will post an example like I did for the other user to learn from.

    Cheers…

    #339210 Reply

    Stu Wade
    Member

    @nvts

    Good for you! I would have made the same offer were I not separated from my PC at the moment.

    #339408 Reply

    philipdk
    Member

    sorry for the delay

    how do i post a picture

    #339412 Reply

    paulD
    Member

    Screen shot your design, then use the upload attachment option in your post.

    #339414 Reply

    philipdk
    Member

    here is my formula

    first

    CF=100/TDD

    TDD=short+long

    Second

    ICR=500/TDD

    any help would be great, i dont know if i have the right text boxes or button

    Attachments:
    You must be logged in to view attached files.
    #339416 Reply

    philipdk
    Member

    there maybe 2 more pages but i havent decided yet
    about them, this is the main page that needs the calculation.

    #339425 Reply

    Stu Wade
    Member

    The last piece of information we require to be able to complete the calculation is: how many decimal places would you like to be displayed in the output fields?

    #339427 Reply

    Stu Wade
    Member

    Try this – I have zipped up a version for you

    Attachments:
    You must be logged in to view attached files.
    #339579 Reply

    Stu Wade
    Member

    Gentle bump, the OP has not yet responded.

    #339592 Reply

    philipdk
    Member

    sorry for the delay in getting back to you, this is the trouble with shift work
    it needs to be a 2 decimal point, and though it works great the worst part
    is i dont know how it was done.

    it looks like java code you imbedded into it, which means if i need to do more
    with this program i need to learn java, maybe i should have purchased
    microsoft visual studio instead of mobione as i have had abit of work
    with visual basic.

    i am working on my second screen which will consist of a text box
    but needs to have one or both the answers pasted into the
    explication to give people more info.

    but many thanks it is a start

Viewing 15 posts - 1 through 15 (of 18 total)
Reply To: calulation

You must be logged in to post in the forum log in