field

在 <bom> 或 <section> 元素中使用 <field> 元素来指定字段。

当在 <bom> 元素中使用时,指定名称和文本;文本属性定义使用哪个变量在数据字段中填充数据。

当在 <bomformat> <section> 元素中使用时,指定名称和标题。名称指定逻辑名,而标题用于显示。如果在 <section> 中有多个字段,那么包含一个顺序属性。

<section name="changesets">
        <field order="1" name="Change" title="Change ID"/>
        <field order="2" name="Date" title="Date"/>
        <field order="3" name="Time" title="Time"/>
        <field order="4" name="User" title="User ID"/>
        <field order="5" name="Client" title="Client"/>
        <field order="6" name="Comment" title="Comment"/>
</section>

使用 condition="function" 属性控制是否将 <field> 元素写入 BOM 报告。funtion 的值是一个表达式,其求值结果为 true 或 false。如果表达式求值结果为 true,那么 <field> 元素中的信息将写入 BOM。如果表达式求值结果为 false,那么该信息不会写入 BOM。请参阅条件函数

使用 template 属性定义 <field> 元素的文本格式。例如,如果文本为字符串,那么模板值可能为“Hello $VALUE”。 当字段写入 BOM 报告时,$VALUE 会替换为字段文本。


反馈