Initially we solved this on the backend with soap calls to read and update the request header (using PAM).
However, we needed some of the values updated immediately so they could be used for queries to populate other form fields. This syntax allowed us to make the changes prior to the initial submission.