我有一個邏輯應用程序實例與載解析的JSON邏輯應用程序中的變量替換表達式
我想使用的值設置id以RESTful API集合資源的 "Set_PO_Key_variable_": {
"inputs": {
"name": "AddedPoKey",
"value": "@{body('Parse_JSON')?['poKey']}"
},
"runAfter": {
"Parse_JSON": [
"Succeeded"
]
},
"type": "SetVariable"
},
變量AddedPoKey。儘管我確信它應該這樣做,但我一直無法實現。我可能沒有找到最好的MS文檔,如果有任何可以指出,我將不勝感激。我曾嘗試過:
"Set_Po_Lin_Add_url_": {
"inputs": {
"name": "CreatePoLineResourceUrl",
"value": "@{replace('https://api.plex.com/EDI/sales-orders/{PoKey}/lines','{PoKey}',triggerBody()['AddedPoKey'])}"
},
"runAfter": {
"Set_PO_Key_variable_": [
"Succeeded"
]
},
"type": "SetVariable"
}
這導致InvalidTemplate。無法在行'Set_Po_Lin_Add_url_'輸入中在行'1'和列'2459'中處理模板語言表達式:'模板語言表達式'替換('https://api.plex.com/EDI/sales-orders/ {PoKey}/lines','{PoKey}',triggerBody()[ 'AddedPoKey'])'不能被評估,因爲屬性'AddedPoKey'不存在,可用屬性是'ContentData,ContentType,ContentTransferEncoding,Properties,MessageId,To,ReplyTo,ReplyToSessionId,Label,ScheduledEnqueueTimeUtc,SessionId,CorrelationId,SequenceNumber,LockToken ,TimeToLive'。請參閱https://aka.ms/logicexpressions瞭解使用細節。'。
您是否在代碼視圖中編寫了該代碼?您是否嘗試過在設計器中使用表達式編輯器,這將允許您在構建表達式時選擇變量和標記。 –
以我的經驗,使用Edge和Firefox,表達式編輯器和設計師在條件的第三次嵌套時陷入困境。這促使我進入代碼視圖。 –