IF/THEN statement - InfoPath Dev
in

InfoPath Dev

IF/THEN statement

Last post 01-12-2012 09:30 AM by Whitney Jones. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 01-11-2012 03:17 PM

    IF/THEN statement

    Okay so here is the setup and question that I have.

    I am working on a expense report form and I have the following fields:  "Total Expenses", "Less Company Paid", Less Travel Advance", "Less Personal Expense", "Due to Employee", and "Due From Employee".  In the "Due to Employee" field I want to take the "Total Expenses" - "Less Company Paid" - "Less Travel Advance" - "Less Personal Expense".  Simple enough, I have that figured out but now here is the tricky part I need the field to only put a total in if it is greater than 0, if not then just 0.  I have tried rules and cant figure out what else to do.  Can someone help?

  • 01-11-2012 04:52 PM In reply to

    What about adding one more field to the data source - called Subtotal (or something that makes sense to you). It doesn't have to show on the form - just add it to the data source. It's default value could be the formula you have above -  "Total Expenses" - "Less Company Paid" - "Less Travel Advance" - "Less Personal Expense".

    Then, put a rule on this field - that when it changes, if the value is greater than zero, set your Due To Employee field to its value, otherwise, set the Due To Employee to 0.

    I'm attaching a simple sample form - save it locally, and right click and select Design to open in design mode. Then you can take a look and try it out in preview.

    Hilary Stoupa

  • 01-12-2012 09:30 AM In reply to

    That worked perfectly......I can't tell you how much I appreciate the help. 

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.