Mileage Reimbursement - InfoPath Dev
in

InfoPath Dev

Mileage Reimbursement

Last post 02-24-2011 04:55 PM by Patrick Halstead. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 02-23-2011 01:11 PM

    Mileage Reimbursement

    Hey,

     Here is the scenario I am having problems with, my company pays for miles driven and want it including on the new company expense report form. How would I have the miles driven field multiple by the ongoing rate of 0.55 centes per mile populate to a total reimburse field? Does that make sense?

    Basically they would enter in the total amount of miles driven it would multiple that by the ongoing rate paid and then populate to a total field.

    Thanks in advance,

  • 02-23-2011 11:28 PM In reply to

    Hi Daniel Clarke,

    This is easy. Take a look at the Expense Report that Microsoft shipped with InfoPath 2007. If you're running InfoPath 2010, just go Google for it. It's in the Office Template site under Microsoft. Once you get the XSN. Save it locally and right click and design. You can use this form as a starting template - it has the subtotal and expense items already defined. To add mileage, you just need to do a couplethings: add a field called miles and add a column to your rows. Ideally you only want them to enter that when they choose Mileage category so you can set up some conditional formatting to hide it if the category is not Mileage. If it is Mileage, you should make the item amount field read only. Set a rule on the mileage field that sets the item amount field equal to the miles X 0.55. Click the Fx button for the set value and enter an xpath like Miles x 0.55. That should just about do it. Maybe 20 minutes to workout the layout changes. Pretty easy stuff. 

    Patrick Halstead
    Project Manager at Qdabra
  • 02-24-2011 07:12 AM In reply to

    Hey Patrick,

    Thanks for your response, I am a little new to Infopath so some of your instructions are not as detailed as I hope for, would you mind expanding on them a little. I already have a nice expense report designed that I will be adding this to. I currently have the following setup for the mileage addition:

    1 Table 3 Columns

    1. Catagory - Mileage(Text Field)
    2. Miles Driven - (Text Field)
    3. Reimbursement Amount (Text Field)

    Could you please expand on your instructions, as I know what I want to do I just dont know the proper way of setting up the conditional formatting/rules/xpath for this.

    Thanks

     -Daniel

  • 02-24-2011 08:35 AM In reply to

    Hi Daniel,

    I'm guessing your form doesn't have subtotal and total calculations - that's why I recommended you look at the Expense Report since it shows how to add those.

    For your fields. Just select Miles Driven text field in the view and add a rule that sets the reimbursement amount based on the miles driven multiplied by the 0.55 number. If you are using 2007, you will right click to get to rules. If you are using 2010, click Manage Rules in the nav bar and add one. When you add the set value action to your rule you need to select the field you will set - that's reimbursement amount - and specify the value - that's the fx button and insert field (Miles Driven) and type in "*0.55" next to it and click the button to verify the formula. Ok, ok. You're done.

    Patrick Halstead
    Project Manager at Qdabra
  • 02-24-2011 11:07 AM In reply to

    Hey Patrick,

     Im a noob, sorry!! :) I know my basic way around the GUI (Infopath 2007), what I dont know how to do is set up the rule properly. What options am I suppse to select...when I select the Miles Driven text box and go to rules I can set a condition or add a action. But then it wants me to choose equal too, not equal to, less than, greater than ect...what options am I suppose to be choosing here, I tried what you previously explained but I got lost in the process of trying to setup the correct rules/actions for these fields. Any additional help would be appreciated and helpful for me learning and understanding infopath and its functions better.

    Ok nevermind, some fumbling around I have it working successfully, I just needed to re-read your post a few times for it to come together. Thank you! Another question now is when I enter the amount of miles driven as 100 I get a reimbursement amount of $55.000000000 how can I format that to ready as $55.00 instead?

    Patrick, thank you for your help, I was able to work out this last issue as well, just had to move my decimal places 2

    Thanks

    -Daniel

  • 02-24-2011 04:55 PM In reply to

    Hooray! I love the strikeout text when you hit the InfoPath ball out of the park. Batter up!

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.