Original Message:
Sent: 03-09-2023 10:07
From: Ernest Jones
Subject: HTTP Header
Hi Dhinmar,
Short Answer:
The "(from Field)" option only can pull the value from one field, not more than one. What you are doing requires replacing the values in the text you provide and I have been using replace() to do that sort of thing.
Details part 1
I put the code you supply in your question into a Generate Data node. Then I used a Transform node to create the header field value with the following code:
out1 += in1out1.myheader = in1.client_id + "\n" + in1.client_secret
Then in the HTTP node you can use "Header (from Field)" like this:
![](https://higherlogicdownload.s3.amazonaws.com/PRECISELY/MessageImages/40096c849c3b44669212a962803a7621.png)
Detail part 2:
I have been following the following pattern a lot lately to do what I think you are wanting to be able to do:
Use a "Input Static" node that defines the structure of the data you want in the output. It has place holders for the data that comes from the input.
![](https://higherlogicdownload.s3.amazonaws.com/PRECISELY/MessageImages/14f973bd7e03439a8638a9eccf6a11b5.png)
The Transform node simply uses replace() to plug the input data into the form like this:
![](https://higherlogicdownload.s3.amazonaws.com/PRECISELY/MessageImages/73062f1dec604f239f14f6b2fb00b025.png)
The resulting output is:
![](https://higherlogicdownload.s3.amazonaws.com/PRECISELY/MessageImages/d0abe4d14d5143b68ce909feb70d6367.png)
Ernest
------------------------------
Ernest Jones
Precisely Software Inc.
PEARL RIVER NY
Original Message:
Sent: 03-08-2023 06:03
From: Dhinmar James Cayog
Subject: HTTP Header
Hi,
Can you please guide me how can I convert this from Header to Header (from Field)? It is working using Header option but I need to use Header (from Field) to make the value dynamic which is needed on another http node.
Header:
client_id: a1b2c3
client_secret: d4e5f6
I tried to do it like below but it does not work.
From Transformation Node:
Configure:
out1.client_id = str
out1.client_secret = str
Process:
out1.client_id ="client_id: a1b2c3"
out1.client_secret ="client_secret: d4e5f6"
HTTP Node:
![](https://higherlogicdownload.s3.amazonaws.com/PRECISELY/MessageImages/f8b19aaaca524f7ba42bf1191ef487b5.png)
![](https://higherlogicdownload.s3.amazonaws.com/PRECISELY/MessageImages/057fc0713f614a48b04fa2ddea4f0878.png)
------------------------------
Dhinmar James Cayog
Knowledge Community Shared Account
------------------------------