,You're You're not doing it totally wrong.
Have a look at this example:
function get-field ($field, $heading) { return "$field - $heading" } $address = get-field "AddressFiled" "AddressHeading" $address to catch the returned value in a variable for further use, you should call the function like in the above example.