将自适应卡设置为货币,参数来自 Apply to Each?
Set Adaptive Card to Currency With Parameter From Apply to Each?
在上图中,它将自适应卡更改为货币。我如何使用其他地方的参数添加它?我正在尝试这样做,但它不起作用。
"value": "${formatNumber(@{items('Apply_to_each')?['Cost Each']}, 2)}"
如何让此代码显示为货币?似乎当我使用“@{items”时它不起作用。有什么建议么?
这是自适应卡。我正在遍历 Excel 数据并想将从 Excel 收到的参数放入自适应卡中并使用 $$ 格式。
{
"type": "AdaptiveCard",
"body": [
{
"type": "Container",
"style": "emphasis",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"size": "Large",
"weight": "Bolder",
"text": "**PART APPROVAL**"
}
],
"width": "stretch"
}
]
}
],
"bleed": true
},
{
"type": "Container",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"size": "ExtraLarge",
"text": "New Part Approval",
"wrap": true
}
],
"width": "stretch"
}
]
},
{
"type": "FactSet",
"spacing": "Large",
"facts": [
{
"title": "Part #:",
"value": "**@{items('Apply_to_each')?['Part Number']}**"
},
{
"title": "Description:",
"value": "@{items('Apply_to_each')?['Description']}"
},
{
"title": "Quantity:",
"value": "@{items('Apply_to_each')?['AOQ']}"
},
{
"title": "Cost Each:",
"value": "@{items('Apply_to_each')?['Cost Each']}"
},
{
"title": "Sell Each:",
"value": "@{items('Apply_to_each')?['Sell Each']}"
}
]
}
]
},
{
"type": "Container",
"items": [
{
"type": "ActionSet",
"actions": [
{
"type": "Action.Submit",
"title": "Approve",
"style": "positive",
"data": {
"id": "_qkQW8dJlUeLVi7ZMEzYVw",
"action": "approve"
},
"id": "ApproveID"
},
{
"type": "Action.ShowCard",
"title": "Reject",
"style": "destructive",
"card": {
"type": "AdaptiveCard",
"body": [
{
"type": "Input.Text",
"id": "RejectCommentID",
"placeholder": "Please specify an appropriate reason for rejection.",
"isMultiline": true
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Send",
"data": {
"id": "_qkQ8dJlUeMVi7ZMEzYVf",
"action": "reject"
}
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
},
"id": "RejectID"
}
]
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2",
"fallbackText": "This card requires Adaptive Cards v1.2 support to be rendered properly."
}
抱歉。
刚问了一位同事,新的 Adaptive Expressions(您在那里用来设置货币格式的那个)实际上还不能在 Power Automate 上运行。
Power Automate 未更新到最新的 Adaptive Cards 版本,因此您可以使用卡片执行的某些操作在流程中尚不可用。
蒂姆
在上图中,它将自适应卡更改为货币。我如何使用其他地方的参数添加它?我正在尝试这样做,但它不起作用。
"value": "${formatNumber(@{items('Apply_to_each')?['Cost Each']}, 2)}"
如何让此代码显示为货币?似乎当我使用“@{items”时它不起作用。有什么建议么? 这是自适应卡。我正在遍历 Excel 数据并想将从 Excel 收到的参数放入自适应卡中并使用 $$ 格式。
{
"type": "AdaptiveCard",
"body": [
{
"type": "Container",
"style": "emphasis",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"size": "Large",
"weight": "Bolder",
"text": "**PART APPROVAL**"
}
],
"width": "stretch"
}
]
}
],
"bleed": true
},
{
"type": "Container",
"items": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"size": "ExtraLarge",
"text": "New Part Approval",
"wrap": true
}
],
"width": "stretch"
}
]
},
{
"type": "FactSet",
"spacing": "Large",
"facts": [
{
"title": "Part #:",
"value": "**@{items('Apply_to_each')?['Part Number']}**"
},
{
"title": "Description:",
"value": "@{items('Apply_to_each')?['Description']}"
},
{
"title": "Quantity:",
"value": "@{items('Apply_to_each')?['AOQ']}"
},
{
"title": "Cost Each:",
"value": "@{items('Apply_to_each')?['Cost Each']}"
},
{
"title": "Sell Each:",
"value": "@{items('Apply_to_each')?['Sell Each']}"
}
]
}
]
},
{
"type": "Container",
"items": [
{
"type": "ActionSet",
"actions": [
{
"type": "Action.Submit",
"title": "Approve",
"style": "positive",
"data": {
"id": "_qkQW8dJlUeLVi7ZMEzYVw",
"action": "approve"
},
"id": "ApproveID"
},
{
"type": "Action.ShowCard",
"title": "Reject",
"style": "destructive",
"card": {
"type": "AdaptiveCard",
"body": [
{
"type": "Input.Text",
"id": "RejectCommentID",
"placeholder": "Please specify an appropriate reason for rejection.",
"isMultiline": true
}
],
"actions": [
{
"type": "Action.Submit",
"title": "Send",
"data": {
"id": "_qkQ8dJlUeMVi7ZMEzYVf",
"action": "reject"
}
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json"
},
"id": "RejectID"
}
]
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.2",
"fallbackText": "This card requires Adaptive Cards v1.2 support to be rendered properly."
}
抱歉。
刚问了一位同事,新的 Adaptive Expressions(您在那里用来设置货币格式的那个)实际上还不能在 Power Automate 上运行。
Power Automate 未更新到最新的 Adaptive Cards 版本,因此您可以使用卡片执行的某些操作在流程中尚不可用。
蒂姆