Add a dynamic value to a table flattening of a REST API
Is it possible to add the dynamic values used in a nested call to a table flattening. In this particular case the first call gets the list of documents and feed the id as a dynamic value to the 2nd call. The response doesn't include any reference to the document and without the id we cannot link the details to a document. I've tried to add it as a static node (name: Document_ID value {id}) but that only results in errors.
Page 1 / 1
I have this exact same issue, I’ll link my question here:
@Thomas Lind do you know if this is possible?
Hi @pontus.berglund
Not the path, but the value can be pulled from the source.
I actually have answered this question a few times already. I can’t remember all of them, so I upgraded the guide to show it.
@hugo.winkelhorst @pontus.berglund does Thomas’ answer above resolve your issue? If so please help us by marking the comment as best answer. Please let us know if you have any follow up questions
@Christian Hauggaard the solution works in TDI when table builder is available. However in version 20.10.66 we have not been able to get the XSLT code to work since the table builder is not there.
Is there any guide on how to work with XSLT in TX classic?
Hi @pontus.berglund
I have a guide for this here.
I explain the structure of XLST as I wrote this guide before the Table Builder was available.
You can use this as a template for those you apply to the field.
Hi Christian/Thomas,
I'm not getting any closer I've tried adding an additional column in the table flattening I've tried lost of variations and also tried CoPilot and ChatGPT but I'm getting nowhere.
This is the first call that gives me the ID's
And this is the call that's using those Id's as a dynamic value to get the details per ID:
the extra_id is where I'm trying to get the ID used for the call into. This was the last suggestion of CoPilot which returns a null. I've tried ../../../id and ../../../../id and also added the template match from the first call to this one. My best result so far is a completely empty column.
I've got it working now, the solution mentioned in the graph API post works for my case as well. I missed it at first and started with the FIXER IO one which doesn't work in my case.
It seemed to work but when transforming the data in the prepare instance we notice that it seems it is only getting the first ID into that column. My table flattening looks like this, what am I doing wrong?
Hi @hugo.winkelhorst
The root node points at the Id field, its value is . which I assume is the root.
Here is my setup in the full.
I used notepad++ and a xml plugin to prettify the code.
My point is. I think it points at the wrong part and therefore has a root node that isn’t of multiple values and then it will not know what to add in the external id field.