Updating record with a value from a rest response

  • 1
  • Question
  • Updated 2 years ago
  • Answered
Hello, have a quick one. I've got a rest api running a pulling data in relation to the Account that is set by the page param.  I then want to use an action to update a row on the account. What would be the correct way of writing the variable? This is what i assumed was correct but is not: {{$Model.APIConnection.response.data.id}}
Photo of Stephan

Stephan

  • 70 Points

Posted 2 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,014 Points 20k badge 2x thumb
Perhaps {{$Model.APIConnection.data.0.id}} ? For all Models, you can get at the data in the first row via .data.0.<fieldName>