Formula Help - InfoPath Dev Sign in | Join | Help in InfoPath 2010 InfoPath (Entire Site) InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads InfoPath Dev » InfoPath » InfoPath 2010 » Formula Help Formula Help Last post 01-11-2012 07:04 AM by csigler. 4 replies. Page 1 of 1 (5 items) Sort Posts: Oldest to newest Newest to oldest Previous Next 01-10-2012 01:25 PM csigler Joined on 10-10-2011 Posts 99 Formula Help Reply Contact =IF(TotRepairEst > 0, "TotCustomerPercent / TotRepairEst") throws an error. Anyone know the correct syntax for this please?Corrie Filed under: infopath 2010, formulas 01-10-2012 01:31 PM In reply to Anson Hidajat Joined on 11-28-2011 Posts 619 Re: Formula Help Mark as Not AnswerMark as Answer... Reply Contact Hi Corrie,There is no IF function in XPath. You probably need to use InfoPath rules to get the behavior you want. What exactly are you trying to do? Anson HidajatQdabra® Software/ InfoPathDev.comThe InfoPath Experts – Streamline data gathering to turn process into knowledge.™ 01-10-2012 01:34 PM In reply to csigler Joined on 10-10-2011 Posts 99 Re: Formula Help Mark as Not AnswerMark as Answer... Reply Contact I have a field that is a total. The formula should be that if FieldA >0, then divide FieldB by FieldA. 01-10-2012 01:47 PM In reply to Jimmy Joined on 07-03-2008 Posts 2,595 Re: Formula Help Mark as Not AnswerMark as Answer... Reply Contact It's a bit convoluted, but this formula should do the trick: (my:fieldA > 0) * (my:fieldB div (my:fieldA + (my:fieldA = 0))) Jimmy Rishe / Software Developer / Microsoft MVPQdabra Software 01-11-2012 07:04 AM In reply to csigler Joined on 10-10-2011 Posts 99 Re: Formula Help Mark as Not AnswerMark as Answer... Reply Contact That worked. Many many thanks! Page 1 of 1 (5 items) Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.
=IF(TotRepairEst > 0, "TotCustomerPercent / TotRepairEst") throws an error. Anyone know the correct syntax for this please?
Corrie
Hi Corrie,
There is no IF function in XPath. You probably need to use InfoPath rules to get the behavior you want. What exactly are you trying to do?
It's a bit convoluted, but this formula should do the trick:
(my:fieldA > 0) * (my:fieldB div (my:fieldA + (my:fieldA = 0)))