【问题标题】:How to get the name of an OptionSet in Power Apps Portal with Liquid tags?如何在 Power Apps 门户中使用 Liquid 标签获取选项集的名称?
【发布时间】:2020-08-06 09:33:21
【问题描述】:

下面的结果集是来自 fetchXML 查询的响应。

<resultset morerecords="0" >
    <result/>
    <result>
        <trit_courseschedule name="Synchronous" formattedvalue="314310000" >
            314310000
        </trit_courseschedule>
    </result>
    <result>
        <trit_courseschedule name="Asynchronous" formattedvalue="314310001" >
            314310001
        </trit_courseschedule>
    </result>
</resultset>

您如何从上述结果集中获取“名称”的值?我做了 trit_courseschedule.name,但它应该是 trit_courseschedule.label,因为您正在获取该选项集的标签。我希望为那些可能像我一样偶然发现这个问题的人提供这个。

【问题讨论】:

    标签: fetchxml powerapps-portal


    【解决方案1】:

    Common Data Service 中的选项集变量由值和标签这两个属性组成。

    • Value 是选项集中每个选项的内部 ID。
    • 标签是分配给选项集中每个选项的名称。

    因此,为了获得带有液体标签的标签,您必须使用以下内容:

    {{yourEntityVariable.yourOptionSetAttribute.Label}}
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-12-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-09-18
      • 1970-01-01
      • 1970-01-01
      • 2011-11-18
      相关资源
      最近更新 更多