简体   繁体   English

您如何通过 Adobe Document Generation 使用复杂或多部分条件?

[英]How do you use a complex, or multi part conditional with Adobe Document Generation?

When using the Word add-in, I can create a condition on one value (if some property is greater than, less than, etc to some value) but I can't check multiple values.使用 Word 加载项时,我可以在一个值上创建条件(如果某个属性大于、小于等某个值),但我无法检查多个值。 So for example: if name is "ray" and age > 48. How do you do that?例如:如果名字是“ray”并且年龄 > 48。你是怎么做到的?

The Word addin lets you do a lot with Document Generation, but can't handle every possible situation, this is one example of that. Word 插件可让您使用文档生成做很多事情,但无法处理所有可能的情况,这就是其中一个例子。 But remember that the tokens that the addin insert into your document is just simple text.但请记住,插件插入到您的文档中的标记只是简单的文本。 You can edit that text as you see fit.您可以根据需要编辑该文本。 So for example, if I insert a condition on my name:因此,例如,如果我在我的名字上插入一个条件:

{% conditional-section expr(name = 'ray') %} 

this person is ray

{% end-section %} 

I can edit that by hand to add more conditions:我可以手动编辑它以添加更多条件:

{% conditional-section expr(name = 'ray' and age > 48) %} 

this person is ray and he is over 48

{% end-section %} 

You can use and and or .您可以使用andor

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM