JohnDanter2
VIP Member
Hi folks
What am I doing wrong here.
I have a simple data request over F0005 and I want to loop through the raw response and fire off a Get Currency Exchange connection (then eventually a form recording of updating F0015 in E1)
So my UDC 55 E1 contains USD GBP and EUR. I want the Orch to loop through the UDC and use the KY values to go get each exchange rate. (The API below defaults from exchange rate input variable to Polish Zlotiy by the way)
But....Even though I return raw output and have a Data Set Variable name, I get a 404 error from the connection as the URL is garbage
Return Raw Output ticked
So then I want to fire off the connector for every row in my UDC.
Connector (which works fine on it's own and even when wrapped in it's own simple ORCH)
It falls over with a bad URL, which is the same error I get if I just call https://api.nbp.pl/api/exchangerates/rates/A/${Currency}/?format=json on it's own with no currency mapped.
If I remove my input in the second step and just map in USD, it works fine
So to me it's not picking up the KY value in my raw output. So what did I do wrong?
I can imagine this is very simple, but I can't figure it out.
Trim the UDC KY maybe? "userDefCode": " EUR",
If anyone agrees this maybe the issue, is there a quicker way to do it other create a new custom groovy step to do this?
Thanks
John
What am I doing wrong here.
I have a simple data request over F0005 and I want to loop through the raw response and fire off a Get Currency Exchange connection (then eventually a form recording of updating F0015 in E1)
So my UDC 55 E1 contains USD GBP and EUR. I want the Orch to loop through the UDC and use the KY values to go get each exchange rate. (The API below defaults from exchange rate input variable to Polish Zlotiy by the way)
But....Even though I return raw output and have a Data Set Variable name, I get a 404 error from the connection as the URL is garbage
Return Raw Output ticked
Code:
{
"Errors/Warnings": [],
"continuedOnError": [],
"RRD_F0005_UDC_DR": [
{
"userDefCode": " EUR",
"description1": "Euro",
"description2": " ",
"specialHandling": " ",
"oF": " ",
"hardCoded": "N"
},
{
"userDefCode": " GBP",
"description1": "British Sterling",
"description2": " ",
"specialHandling": " ",
"oF": " ",
"hardCoded": "N"
},
{
"userDefCode": " USD",
"description1": "US Dollar",
"description2": " ",
"specialHandling": " ",
"oF": " ",
"hardCoded": "N"
}
]
}
So then I want to fire off the connector for every row in my UDC.
Connector (which works fine on it's own and even when wrapped in it's own simple ORCH)
It falls over with a bad URL, which is the same error I get if I just call https://api.nbp.pl/api/exchangerates/rates/A/${Currency}/?format=json on it's own with no currency mapped.
If I remove my input in the second step and just map in USD, it works fine
So to me it's not picking up the KY value in my raw output. So what did I do wrong?
I can imagine this is very simple, but I can't figure it out.
Trim the UDC KY maybe? "userDefCode": " EUR",
If anyone agrees this maybe the issue, is there a quicker way to do it other create a new custom groovy step to do this?
Thanks
John
Last edited: