I've a module in InfoPath / Sharepoint, a query field, and some fields. I want to perform in formula a simple :
If (Condition) then
True Condition
Else
False Condition
In particular I want to write this formula:
If (FieldA = "") then Get FieldB else Get FieldA
How to do in InfoPath formula ?
Thanks
If you want to use this as a default value, you can simply use the conditional default values
. Therefor just use the following snippet:
(TrueResult | ElseResult) [(BoolCondition) + 1]
And in your case:
(FieldA | FieldB) [(string-length(FieldA) > 0) + 1]
For more information on this see: https://blogs.msdn.microsoft.com/infopath/2006/11/27/conditional-default-values/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With