Using a Variable in a Web Activity Body? URGENT PLS

Mike Kiser 1,536 Reputation points
2020-12-19T04:36:00.91+00:00

Hello!
I have the following as part of my ADF Web Activity Body. My question is, can I do this?

"XRefCode": "@variables('Payclass')"

49624-screenshot-2020-12-18-223310.jpg49652-screenshot-2020-12-18-223217.jpg


"XRefCode":  "@{item().employeeType}",  
"ShortName": "@{item().FirstName}",  
"LongName": "@{item().LastName}",  
"LastModifiedTimestamp": "@{item().lastmodtimestamp}"  

},
"PayClass": {
"XRefCode": "@variables('Payclass')"
},
"BaseSalary": "@{item().annualSalary}",
"BaseRate": "0",

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,814 questions
0 comments No comments
{count} votes

Accepted answer
  1. MartinJaffer-MSFT 26,091 Reputation points
    2020-12-21T19:17:10.643+00:00

    Hello again @Mike Kiser and thank you for your question.

    All you need to do is put it in curly braces like you have the item portions of your code.

    },  
    "PayClass": {  
    "XRefCode": "@{variables('Payclass')}"  
    },  
    "BaseSalary": "@{item().annualSalary}",  
    "BaseRate": "0",  
      
      
    

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.