Writing some code to do an insert from rest API into database. One of the fields needs to be limited to 8000 characters which I am having trouble doing.
Tried lots of googling.
$searchResultsResponse = Invoke-RestMethod -Method GET -Uri $searchResultsUri -ContentType application/json -Header $requestHeader
$dt = $searchResultsResponse.fields | Select -Property @{label="val";expression={$_.value.Substring(0,8000)}},displayName,name
Expecting the character length to be limited to so many characters but it returns a null value