If Then Else in Infopath (Xpath): how to ?

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/

链接地址: http://www.djcxy.com/p/40138.html

上一篇: Azure Cosmos数据库更新模式

下一篇: 如果那么在Infopath中的其他人(Xpath):如何?